redho home | products | services
Web Design Forums

Web Design Forums  


Web Hosting, Web Design, Software and Web Development Forums  
 FAQFAQ   MemberlistArchive  Log inLog in   RegisterRegister 
         

css


Goto page 1, 2  Next
 
Post new topic   Reply to topic    Web Design Forums -> HTML forum
View previous topic :: View next topic  
Author Message
froomzer



Joined: 23 May 2006
Posts: 148
Hi
If I in a <b class="blabla"> want to define a style too, which is identical to blabla *{} in the stylesheet-file, how would I have to do it?
  Reply with quote


PaulKolin



Joined: 25 May 2006
Posts: 108
Urm, what
  Reply with quote
froomzer



Joined: 23 May 2006
Posts: 148
PaulKolin: y'know, like you can use this: <b class="blabla" style"background: #FF0000;"> but that defines background for the class "blabla". What I want to is with the style="" part to define the background of what in a normal stylesheet would be called ' blabla * {background: #FF0000;} '
How would I do that?
  Reply with quote
PaulKolin



Joined: 25 May 2006
Posts: 108
B.blabla {}
  Reply with quote
froomzer



Joined: 23 May 2006
Posts: 148
Aha, thanks:)
  Reply with quote
PaulKolin



Joined: 25 May 2006
Posts: 108
Basic basic selectors.
  Reply with quote
froomzer



Joined: 23 May 2006
Posts: 148
Ok
PaulKolin, so, like <b class="blabla" style="b.backgroundcolor: #FF0000;"> ? Hm. something looks wrong there.
  Reply with quote
PaulKolin



Joined: 25 May 2006
Posts: 108
Ug. not at all
  Reply with quote
froomzer



Joined: 23 May 2006
Posts: 148
That's what I thought.
  Reply with quote
PaulKolin



Joined: 25 May 2006
Posts: 108
Basic basic selectors.
Http://css.maxdesign.com.au/selectutorial/
Read that
All
  Reply with quote
froomzer



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



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



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



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



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



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



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



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



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



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
froomzer



Joined: 23 May 2006
Posts: 148
In what way?
  Reply with quote


Poolkop



Joined: 01 Jun 2006
Posts: 123
B.en { } b.fr {} b.es {}
  Reply with quote
froomzer



Joined: 23 May 2006
Posts: 148
But another thing that confuses me is; is e.g. b.lang {} the same and equally valid as lang * {}
  Reply with quote
Poolkop



Joined: 01 Jun 2006
Posts: 123
.lang * {}
If you had a class "lang" applied to some high level element like html or body
  Reply with quote
froomzer



Joined: 23 May 2006
Posts: 148
Ok
  Reply with quote
Page 1 of 2 Goto page 1, 2  Next
Post new topic   Reply to topic    Web Design Forums -> HTML forum


Dubai Forums - Expat Help | Vegan Chat | Java Programming | Free 3D tutorials and 3d textures | Paris Forum | EU Forum
Free Dubai Classifieds | Free London Classifieds | Jobs in London

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

Powered by phpBB © 2001, 2005 phpBB Group