Now with 75% fewer <div>s!
Blogging has been light as of late. One of the reasons is that I’ve been doing a major site-overhaul. “What?” you say, “Your site looks completely unchanged.” Well, exactly.
While trying to write an alternate stylesheet — for reasons that I won’t get into right now — I came to realize that my job was made much more difficult by the existing markup. The MovableType default templates are a morass of nested <div>
s and <span>
s. On top of that, I had added my own layers of cruft. Wading in, I realized what a tour de force Mena’s CSS stylesheets are.
What to do? Get rid of the unnecessary nesting, use <ul>
s for lists of stuff, rather than
<div> item 1<br /> item 2<br /> ... </div>
and use <h*>
for headers, rather than yet more <div>
s.
Same visual effect, but much simpler and easier-to-work-with code.
Posted by distler at April 8, 2003 12:07 PM