font-family causes gap

Atom RSS

This site heavily relies on bug reports created by its readers. Anyone can report a bug and be published.

Main navigation:




Search reports by browser:

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 beta 2 | Reported on 16 February 2005.

Comments

(Add your own)

Posted by Vesa Piittinen on 17 February 2005

1

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.

Posted by Alex Bischoff on 22 February 2005

2

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).

Post a comment

Commenting guidelines:

  1. When quoting specs, articles or your own research, please include a URL of the document.
  2. Test your stuff. When reporting browser behaviour, make sure that your report is correct.

Yes