Forum Moderators: not2easy

Message Too Old, No Replies

Style sheet inheritence

Define a block of rules as children of a class/id?

         

TGecho

7:23 pm on Jun 27, 2003 (gmt 0)

10+ Year Member



I'm sure a lot of you have stylesheets that read something like this:

#nav a { ... }
#nav a:hover { ... }
#nav a img { ... }
etc...

Is there any way to define a block of rules as always having "#nav" before it?

always-have: #nav {
a { ... }
a:hover { ... }
a img { ... }
etc...
}

Just wondering. Looking for more ways to slim down my code without cutting out closing tags and such.

drbrain

7:56 pm on Jun 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Nope, there is not. Remember your stylesheets are only sent once, then verified occasionally (you may want to make sure your server is set up to allow caching properly).

TGecho

9:02 pm on Jun 27, 2003 (gmt 0)

10+ Year Member



>> Remember your stylesheets are only sent once, then verified occasionally <<

I know, just thought it would be nice. Guess cutting down file sizes becomes a bit of an obsession after a while. :)