I have the following code and it allows red to jump from element a. Why is this. I would expect the element to only expand to the size of the content, but it looks like it is slightly larger than that. See the code here http://codepen.io/anon/pen/soqEz .
HTML
<a href="#"><img src="http://placehold.it/150x150" /></a>
CSS
a{ background: red; margin-bottom:0; padding-bottom:0; border-bottom:0; } img { margin-bottom:0; padding-bottom:0; border-bottom:0; }
EDIT: I see the answers below ... but can anyone explain why this place exists in EVERYTHING (I mean this is a block level element ... what is its purpose in the first place) ... unlike attempts to get rid of him. Thanks
html css
byronyasgur
source share