The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
CSS If Condtion?
Is it possible to use if conditionals in CSS? Like template conditions, profile field conditionals, ect?
|
#2
|
|||
|
|||
I don't think so, but you can try to make two ids, #first_user, #second_user and then use if in template.
Code:
<if condition="something == 0"> <sometag id="first_user"/> <else /> <sometag id="second_user"/> </if> |
#3
|
|||
|
|||
Well I wanted to make it so that a profile field containing a background image link could be used in the CSS. This way the USER can decide the background.
|
#4
|
||||
|
||||
Have you tried it? I would think that if you add the css inline - style="background: xxxxx"
|
#5
|
|||
|
|||
Yea I sent to the CSS manager and added $userinfo[field15] to the background url($userinfo[field15]), but it didn't work. It just made the url to http://www.website.com/$userinfo[field15]
|
#6
|
||||
|
||||
Add it *inline*.
HTML Code:
<div style="background: url($userinfo[field15])"> etc....
|
#7
|
|||
|
|||
Quote:
EX: Code:
body { background: #080B1C url(banner.jpg) no-repeat top center fixed; color: #007DDA; font: 11px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; margin: 0px; padding: 0px; height: 100%; |
#8
|
||||
|
||||
OK, so try it inline in the body tag. Just try it inline as opposed to putting it in the css area.
|
#9
|
|||
|
|||
What do you mean? Wouldn't this mean I would have to edit the body tag on EVERY template?
|
#10
|
||||
|
||||
I was trying to figure out if it would work that way. If it does, then you can figure out how to go about it.
I think I'm not understanding what you are doing. You have a User Profile Field, and the user enters a color for the background? adn then you want that to effect the background on all your pages? What is the name of your background class that you need to change or is your background actually part of the body tag as you said above? If so, have you tried just seeing if it works inline for the body tag, or tried adding the class/css in the headerinclude template? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|