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
Comments
Post a Comment