Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-17-2009, 09:04 PM
AndyN AndyN is offline
 
Join Date: Jun 2008
Location: Sarasota, FL USA
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Different CSS styles for vB vs rest of site

Hi there,

I have a fairly complex site CSS style-wise and am trying to integrate vB into one of the pages. I am successful with modifying vB's header / headinclude / footer to get the forum to display in a "div" but am now running into CSS style conflicts - things just don't look right.

Is there a way to have the vB CSS styles active only in the vB "div" (and vice versa - have the site's CSS styles active for rest-of-site)?

PS - i have searched these forums quite a bit and have come up dry - i am a little surprised that this isn't a newb tutorial somewhere - unless it is so easy I am missing something ...

TIA ...
Reply With Quote
  #2  
Old 05-18-2009, 02:19 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't get what you mean. If you only include the vbulletin css in the vbulletin portion of your site, then it shouldn't interfere with the css on other pages of your site.
Reply With Quote
  #3  
Old 05-18-2009, 06:47 AM
ProSkinner.com's Avatar
ProSkinner.com ProSkinner.com is offline
 
Join Date: Aug 2005
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you could add "html " before all vBulletin classes, it would get the job done and successful override your custom CSS. (e.g. changing .tcat { } to html .tcat { } would force override any inherited CSS, which is the problem you're facing. Because vBulletin's existing CSS definitions can't be renamed, you won't be able to do that.

My suggestion is to edit your custom CSS and remove any conflicting tags. For example, if you have a definition called div#header or div.header, you should remove the "div" part or anything before the # or dot.
Reply With Quote
  #4  
Old 05-18-2009, 11:12 AM
AndyN AndyN is offline
 
Join Date: Jun 2008
Location: Sarasota, FL USA
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lynne, the conflict happens when i need to include the CSS style definitions of the current site in order to display the header / footer of the forums page and maintain the site look & feel, then include the vBulletin CSS definitions for the forums themselves. The two sets of CSS definitions have names that overlap/conflict.

ProSkinner is right - i was looking for a way out exactly as he first stated - the ability to globally change the names of the vBulletin classes would do what i need. I am very surprised this issue has not come up before thus forcing the ability to re-name vBulletin CSS definitions.

So i am stuck in a fairly ugly position. Since I cannot re-name vBulletin CSS definitions, then i need to re-name the definitions for the rest of the site (which i also cannot do). SO i will have to maintain a variant of the rest-of-site style sheet with any conflicts removed. Thus if the style sheet for rest-of-site is updated, the custom sheet will have to be manually updated as well. OH and i will have to manually identify the conflicts as well - something i don't look forward to (does anyone enjoy reading style sheets?).

It would be nice if vBulletin had the option to define a unique set of CSS definitions for integration purposes by adding a prefix as ProSkinner recommends.
Reply With Quote
  #5  
Old 05-18-2009, 02:38 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm, I can see where that is messy. Is it the actual css that is used in the header/footer that is causing the problems or the extra css brought in that is causing the problems? I'm wondering if you could put a condition around the css in the headerinclude template and not include it on your extra pages and instead include another css page (one you create by taking the original and deleting all the css you don't need).

Any solution is going to be a bit messy.
Reply With Quote
  #6  
Old 05-18-2009, 03:39 PM
EnIgMa1234 EnIgMa1234 is offline
 
Join Date: Mar 2006
Location: .:: Ireland ::.
Posts: 1,306
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You could just copy the CSS of the header and footer into the vbulletin CSS and give them unique names.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:24 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.04559 seconds
  • Memory Usage 2,202KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete