vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Create overwriting CSS file (https://vborg.vbsupport.ru/showthread.php?t=315460)

TheRealso0sick 11-17-2014 02:04 PM

Quote:

Originally Posted by ozzy47 (Post 2523117)
Are you setting your css elements to !important ?

No. Is that necessary if I do it this way?

--------------- Added [DATE]1416240528[/DATE] at [TIME]1416240528[/TIME] ---------------

Code:

<!-- BEGIN TEMPLATE: headinclude_bottom -->
<link rel="stylesheet" type="text/css" href="clientscript/vbulletin_css/style00079l/additional.css?d=1412187223" />
<link type="text/css" rel="stylesheet" href="https://code.google.com/p/my_project841924/source/browse/trunk/my_style.css?d=1412187223" />
<!-- END TEMPLATE: headinclude_bottom -->
<link rel="stylesheet" type="text/css" href="css.php?styleid=79&amp;langid=1&amp;d=1412187223&amp;sheet=additional.css" />
</head>

This is how the file is included when I use your plugin.
Theres still a additional.css below my css file..

ozzy47 11-17-2014 02:10 PM

Yeah, the additional.css is the last thing loaded, so it will overwrite any css that is not set as important.

TheRealso0sick 11-17-2014 02:11 PM

But there must be a way to get around it? :/
And also, why are there 2 additional.css files loaded?

ozzy47 11-17-2014 02:15 PM

The way around it is like I said, set your CSS elements to important. Or you can remove the call for the additional.css from the templates.

I only see one additional.css in the code you posted above.

TheRealso0sick 11-17-2014 02:18 PM

What if i just cut all the css from the original additional.css file, leave it empty and then copy all of it to my css file, then include it via the plugin?

If you check the code above, theres 1 additional.css on line 2 and another at line 5.

ozzy47 11-17-2014 02:25 PM

Yeah you could cut it out of the additional.css or just comment everything out in the file.

TheRealso0sick 11-17-2014 02:32 PM

That works!
Thanks for your help ozzy

ozzy47 11-17-2014 02:48 PM

Excellent, glad to hear all is good. :)

Lynne 11-17-2014 04:34 PM

Quote:

Originally Posted by TheRealso0sick (Post 2523051)
But wouldn't that completly remove all other stylesheets? I don't want them to be gone.

What i want to do is to create a css file that is on top of all other stylesheets,
so i can overwrite them, instead of going in each of the template files and look for the
specific css code everytime.

Thanks for the help so far Lynne

Ah, I misunderstood. I read your post and thought you wanted to completely get rid of ALL the CSS and then only have your own stylesheet.

TheRealso0sick 11-18-2014 01:25 PM

Np, Lynne.
And ozzy:

I actually found a much simpler way to get this to work.
All you do is just use the @import-rule and put it on top of your additional.css file.
(like @import url("screen.css"); )

That way all the external css from that file will be imported in your additional.css file..
You can overwrite existing css with the !important tag
and your good to go.


All times are GMT. The time now is 12:49 PM.

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.01100 seconds
  • Memory Usage 1,735KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete