css - Why is the height of a 'div>a>img' larger than the size of the wrapped img? -


if set img's size 100*100, containing div 100*106.

where '6px' come from? how behavior fit standard?

@clyde; yes natural behavior of image because img inline element user agents leave space descender characters.

you can remove css:

img { display:block; } or img { vertical-align:bottom; } 

for more check these

https://developer.mozilla.org/en/images,_tables,_and_mysterious_gaps

unwanted padding-bottom of div


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -