redho home | products | services

Programming Forums


Community for Java, PHP, Perl C, ASP and Python programmers
Friday 03 September 2010 04:50

Ask your IT question here

css


Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    Programming Forums -> CSS forum
View previous topic :: View next topic  
Author Message
froomzer
Enthusiastic Coder


Joined: 23 May 2006
Posts: 148
Thanks again.
Can I combine class and style in a <b>?
The style has to adjust properties of the b.classname property.
I can only make it work for 'classname' and not 'b.classname'
Selectutorial doesn't say anything about it as far as I can see... I have to do it in the <b>, and not the stylesheet.css
Cause it's in a php-function

Reply with quote
 
Poolkop
Enthusiastic Coder


Joined: 01 Jun 2006
Posts: 123
What difference does that make?
Reply with quote
 
froomzer
Enthusiastic Coder


Joined: 23 May 2006
Posts: 148
Cause I use inline php to change the property according to a _GET variable
Like this (for example) : <b class="box2" <?php if ($lang == "en") { echo "style=\"background:#FF0000;\""; } ?> >
Hm. I'm stuck with this.

Reply with quote
 
Poolkop
Enthusiastic Coder


Joined: 01 Jun 2006
Posts: 123
Why can't you add another class?
Or manipulate the class name
B class="box2 lang"> for example

Reply with quote
 
froomzer
Enthusiastic Coder


Joined: 23 May 2006
Posts: 148
Will lang overwrite existing properties of box2 then?
Reply with quote
 
Poolkop
Enthusiastic Coder


Joined: 01 Jun 2006
Posts: 123
It could
Reply with quote
 
froomzer
Enthusiastic Coder


Joined: 23 May 2006
Posts: 148
If background is defined in box2 and in lang, and it's invoked with b class="box2 lang", will lang be dominant?
Reply with quote
 
Poolkop
Enthusiastic Coder


Joined: 01 Jun 2006
Posts: 123
B.box2 { /* defaults */ } b.lang { /* subsequent, therefore, overwrites equal or lower specificity elements */ }
Depends on your css

Reply with quote
 
froomzer
Enthusiastic Coder


Joined: 23 May 2006
Posts: 148
Great
Reply with quote
 
Poolkop
Enthusiastic Coder


Joined: 01 Jun 2006
Posts: 123
This would give you lots of flexibility if you actually used the value of lang as your class too
Reply with quote
 
Page 2 of 3 Goto page Previous  1, 2, 3  Next
Post new topic   Reply to topic    Programming Forums -> CSS forum


Dubai Forums - Expat Help | Vegan Forum | Java Programming | 3d Design Resources | 3d Forum | 3D Jobs | 3D Textures | Paris Forum | Europe Forum
Dubai Classifieds | Dubai Property | Jobs in Dubai | Free London Classifieds | Jobs in London UK

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Based on phpBB © 2001-2010 RedHo