> I just spent the last two days trying to figure out
> why I couldn't get the correct padding/spacing in my
> nested UL menu.
> After finally debugging the example from listomatic I
> narrowed it down to the doctype.
> Maybe this is a rookie move, I've been developing
> sites for 7 years, and haven't ever really needed a
> specific doctype until now.
> For the nesting to work properly in IE, you need to
> have a doctype of:
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Yes, !DOCTYPE matters. For a long time IE had a broken box model. It
calculated widths incorrectly. That was resolved in IE6, which now
calculates (mostly) to the CSS specifications. To accommodate these
differences, browser publishers use the !DOCTYPE to determine which way
the browser should behave. Without a !DOCTYPE, IE and some other
browsers will go into "quirks mode" calculating widths the wrong way.
Use a valid !DOCTYPE and the browser behaves in standards mode.
A List Apart article about !DOCTYPEs
The ORIGINAL box model article. Note, there are many more efficient
hacks since this article was written. However, it has great illustrations.
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/