Skip to the Main Content

Note:These pages make extensive use of the latest XHTML and CSS Standards. They ought to look great in any standards-compliant modern browser. Unfortunately, they will probably look horrible in older browsers, like Netscape 4.x and IE 4.x. Moreover, many posts use MathML, which is, currently only supported in Mozilla. My best suggestion (and you will thank me when surfing an ever-increasing number of sites on the web which have been crafted to use the new standards) is to upgrade to the latest version of your browser. If that's not possible, consider moving to the Standards-compliant and open-source Mozilla browser.

April 8, 2003

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

TrackBack URL for this Entry:   http://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/135

0 Comments & 0 Trackbacks

Post a New Comment