font-family causes gap

Using a sans-serif font-family may cause an unwanted gap between tightly stacked items.

Test page. Workaround is included.
Reported by: Maxine.

Explorer 5-6 Windows, Explorer 7 | Reported on 16 February 2005.

This site is no longer maintained. I’m sorry, but it’s just too much work for too little return. You can continue to browse old bug reports, though.

Search reports by browser:

Atom RSS


(Add your own)

1 Posted by Vesa Piittinen on 17 February 2005 | Permalink

I found out an interesting thing: if you specify line-height with times fonts, the gap comes with it! Also, if you define line-height: 110% in #navbar when using sans-serif at #navbar ul, the gap disappears, but with 100% the gap appears. So it seems to be a bug in IE's ability to handle line-height, because when I drop line-height below 100%, the gap just becomes bigger and bigger. Actually, this makes me think this is the all-old IE bug where elements can't be smaller than the size of the font.

2 Posted by Alex Bischoff on 22 February 2005 | Permalink

Another means around this, when setting anchor tags within list items to display:block, is to set the list items to display:inline (and you may also need position:relative on the unordered list's parent element).