The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › [Solved] Why is this image placing itself this way?
I am confused about the behavior of these image links. Specifically, the parent <a> element’s size seems to be arbitrary / random. Secondly, the left image is outside the bounds of the <a> parent.
<a>
Why is the element not simply 50x50px like its child?
http://codepen.io/ErikAGriffin/pen/YyzWPw
Try this
header a { border:2px dashed white; display: inline-block; } header a img { border:2px solid yellow; display: block; }
http://codepen.io/Paulie-D/pen/GpRqBM
Thanks @Paulie_D you’re a legend