Hi all, hope everyone is doing well. :)
CSS example 1:
.fl { float: left; }
<div id="main" class="fl">Content</div>
<div id="secondary" class="fl">Content</div>
<div id="sub" class="fl">Content</div>
CSS example 2:
#main, #secondary, #sub { float: left; }
<div id="main">Content</div>
<div id="secondary">Content</div>
<div id="sub">Content</div>
CSS example 3:
#main { float: left; /* plus other styles */ }
#secondary { float: left; /* plus other styles */ }
#sub { float: left; /* plus other styles */ }
(IBID, HTML same as above)
I usually code the third way... just pack everything into one ID... But
when I start noticing common styles (for example: clears, background
colors, and/or font colors), it seems more logical to apply classes to
my markup like the first example (or second... which is better?)
Now, I have read that "class-itis and div-itis" is a bad thing... Would
the first example be considered "class-itis"?
Heck, I have seen some advanced layouts by professional people that use
nothing but classes for page layout... is it just one of those "once you
know the rules, then you can break them" things?
Hope that makes sense. :)
Basically just wondering what you guys typically do to minimize bloat
and streamline your css.
TIA! :)
CHeers,
Micky
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/