Let’s say you have several images in a DIV which are absolutely positioned such that they overlap but with no z-index defined:
CSS
img {
position: absolute;
top: 0px;
left: 0px;
width: 100px;
height: 100px;
}
HTML
<div>
<img src="...">
<img src="...">
<img src="...">
</div>
I’ve noticed that Safari and Chrome will display the last element on top. Is this standard behavior? In other words, is it relatively safe to assume that most browsers will display the last element on top?
Yes, it’s safe to assume. According to the W3C: