vBulletin Mods

The Official vBulletin Modifications Site

Different Style for Mobile?
by DarrenS
20 Jan 2021 06:29

I see that vB5 has removed the settings for choosing a different style to serve to mobile browsers. I understand that the intention is for styles to be responsive.

However I want to make different style choices in serving the forum to desktop and to mobile users (mostly in the header). In Googling I've seen references to using specific CSS classes to modify mobile in distinct ways within css_additional. So, two questions:

(1) Is there a guide or documentation that explains how to do this?

(2) Are modifications limited to CSS, or are there also conditional tags I can apply to the header template (e.g., so that a block of HTML code only appears on desktop)?


delicjous 20 Jan 2021 19:42

.l-small .yourdiv
.l-desktop .yourdiv

Could be used to select your div in desktop or mobile view.

DarrenS 20 Jan 2021 23:18

So I can add this class to any existing class to target one or the other? (Presumably desktop is all default anyway.)

Does it work on ID names as well? E.g.: .l-small #myclass

Edit: Yes it does! Thanks for the tip.

All times are GMT. The time now is 23:21.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.