vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=264)
-   -   Different Style for Mobile? (https://vborg.vbsupport.ru/showthread.php?t=328527)

DarrenS 01-20-2021 05:29 AM

Different Style for Mobile?
 
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)?

Thanks!

delicjous 01-20-2021 06:42 PM

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

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

DarrenS 01-20-2021 10:18 PM

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 12:25 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01119 seconds
  • Memory Usage 1,706KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete