vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Stylevars & CSS (https://vborg.vbsupport.ru/showthread.php?t=263390)

Da-Vinci 05-10-2011 01:25 AM

Stylevars & CSS
 
I'm having a problem getting Stylevars to work for me on a CSS file that I've uploaded to my forum root.

Basically I've made a dropdown menu and wanted to make it universal for all skins so as not to have multiple CSS files for various skins, with various edits to make them match the skin.

The Stylevars I wanted to use are for the PopupMenus.

imodhilite_backgroundColor
imodhilite_color
popupmenu_background
popupmenu_border
popupmenu_border_radius
popupmenu_color
popupmenu_font
popupmenu_padding

So for instance a snip of the CSS would look like.

HTML Code:

icondropdownmenu li a{
display: block;
width: 160px;
height: 10px;
color: {vb:stylevar popupmenu_color};
background: {vb:stylevar body_background};
border-bottom: {vb:stylevar popupmenu_border};
padding: {vb:stylevar popupmenu_padding};
}

The problem is when using the stylevars they don't work, if I revert to HTML colours then the CSS works perfectly.

Where am I going wrong with this?

Also rather than have a CSS file uploaded to my forum root or elsewhere how could I add the CSS to one of the CSS templates? I know I can make a new CSS template but how do I make my modification use the CSS from that template, currently I've used a line in my header template to point at the CSS file.

Code:

<link rel="stylesheet" type="text/css" href="icondropdownmenu.css" />
Any help with this would be greatly appreciated. :up:

Lynne 05-10-2011 01:43 AM

Is this being done via a template or just some file you are creating? The stylevars are only going to work if you put them into a template.

Raeven 05-10-2011 05:58 AM

If its only for your Forum, just use the additional.css (in your Style Templates). CSS put in there, will be loaded on every part of your Forum.

Da-Vinci 05-10-2011 08:14 AM

Quote:

Originally Posted by Lynne (Post 2193873)
Is this being done via a template or just some file you are creating? The stylevars are only going to work if you put them into a template.

I'm using the Stylevars in the CSS file that's uploaded to my forum root, but making the edit on my Navbar template.

Quote:

Originally Posted by Raeven (Post 2193913)
If its only for your Forum, just use the additional.css (in your Style Templates). CSS put in there, will be loaded on every part of your Forum.

Thanks, that worked a treat.


All times are GMT. The time now is 05:29 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.03471 seconds
  • Memory Usage 1,720KB
  • 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)bbcode_code_printable
  • (1)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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