![]() |
CSS If Condtion?
Is it possible to use if conditionals in CSS? Like template conditions, profile field conditionals, ect?
|
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"> |
Quote:
|
Have you tried it? I would think that if you add the css inline - style="background: xxxxx"
|
Quote:
|
Add it *inline*.
HTML Code:
<div style="background: url($userinfo[field15])"> etc.... |
Quote:
EX: Code:
body |
OK, so try it inline in the body tag. Just try it inline as opposed to putting it in the css area.
|
Quote:
|
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? |
Quote:
background: #080B1C url(banner.jpg) no-repeat top center fixed; I want the members to be able to enter their background url into the profile field and them be able to see their background. |
OK, so have you tried adding something to the headerinclude template like I suggested?
HTML Code:
<style type="text/css"> |
Code:
syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /public_html/forum/includes/adminfunctions_template.php(3950) : eval()'d code on line 3 Code:
<style type="text/css"> |
Can't use quotes between [] for variables in templates. Parsing issue.
|
Whoops, I knew that. Thanks, Wayne.
|
Thanks guys! It works now.
|
All times are GMT. The time now is 06:00 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|