html - Why is this DIV padded at the top? -


here test-case problem:

http://game-point.net/misc/testparapadding/

i want progressbargreen.png image inside div, , div right height (15px) hold it, there couple of pixels padding @ top of div. why? browser seems sizing content if contained text because padding changes if remove font-family styling body, there no text in div.

interestingly problem doesn't happen in firefox's quirks mode.

jsfiddle example

you need line-height:15px on div holding image

edit: explanation behaviour line-height affecting no-text blocks


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -