I need to display different content on mobile than on tablets or desktops. How do I do something like:
(on mobile)
Display Short text of a brief summary
(end on mobile)
(on everything not mobile)
Display much longer text and/or HTML because I have
more real estate to more fully describe something.
Continue to develop the topic, adding a bunch more text.
(end on everything not mobile)
Thanks a ton. If you’ve covered this somewhere else, my apologies – I looked around and couldn’t find anything.
Hi bjconcan!
You could do this with CSS. Surround your content with something like this.
<span class = "mobile">
mobile content goes here
</span>
<span class = "desktop">
desktop content goes here
</span>
And then add this to your custom CSS.
.mobile { display: none; }
.desktop { display: block; }
@media only screen and (max-width: 479px) {
.mobile { display: block !important; }
.desktop { display: none !important; }
}
Cheers!
Elliott
Perfect, thanks so much Elliot!
One more thing – anyway to hide the full-screen slider on mobile like the Layer-Slider option?
Hey!
Try adding this.
@media only screen and (max-width: 479px) {
.avia-layerslider { display: block !important; }
}
Regards,
Elliott
Thanks – works great!