I am a Hack

I am a Hack

I did something sort of bad to my CSS stylesheet, to fix a long-standing bug in the right sidebar for Internet Explorer 6. Geeky notes follow.

The HTML for this site is based on a really old Movable Type template. I used MT for about a day, before deciding I liked WordPress better. However, I liked the MT template better, and moved it over. Since I didn’t really know what I was doing, I just mushed it around until it looked about right. That was a couple years ago.

Since meeting all manner of skilled web designers at SXSW this year, I’ve been motivated to finally read up on CSS and Semantic HTML. For the first time I’m actually excited about web design and development, and am slowly putting together a list of best practices.

All that reading, however, wasn’t quite enough to make me redo the HTML for the site; that will wait for the redesign. So instead I just stuck a negative left margin in with a _margin-left: -8px for the #menu ul declaration, which gets seen only by IE. Im my mind, I’m hearing dogs barking, mortar fire, and cars smashing into telephone posts!

3 Comments

  1. Bronwyn 18 years ago

    Label it with a comment saying it’s a hack.  One day you may need to know that, and not remember it. (If you had a lot of them, I’d say make a hacks stylesheet.)

    ——-

  2. Karl G 18 years ago

    Might be more trouble than it’s worth, but I recommend doing a conditional comment and putting the IE-only overrides in that stylesheet.


    …ie junk goes here…

  3. Dave Seah 18 years ago

    Thanks for the recommendations! I did put a comment in there, because I know I would probably forget it at some point. The hacks stylesheet / conditional detection is an interesting idea…it’s a good reason to hunt down the “world’s best browser detection” script.