Archive for the ‘CSS’ Category

LI padding/margin in Internet Explorer

Wednesday, June 28th, 2006

While reworking my HTML in ClockingIT to support TaskList reordering with Drag and Drop, I ended up with some strange padding around empty LI’s used to make sure a tasklist never ends up empty (to work around a dropOnEmpty problem with Prototype/Scriptaculous). After several hours of trying just about everything, it seems IE decides that and empy LI needs to have some content after all, and that empty content makes IE refuse to set an height on the LI lower than the font-size inherited by the LI. Forcing

style="font-size: 1px; and line-height: 0px;"

on the empty LIs fixed the problem.