Home › Forums › CSS › Something weird › Re: Something weird
November 16, 2012 at 2:31 am
#114527
Meta_Ing
Participant
It seems like inline elements (such as img) are stacked higher than block elements, regardless of whether they come before or after [the block element].
I think what’s happening is that because the img and h2 are sibling elements, the img overlays the actual h2 itself (in this case, the background) based on what I said above, but the text inside the h2 overlays the img because it is a child of the h2.
Here’s something I wrote that should hopefully explain what I mean: http://codepen.io/Iire/pen/fheGA