You duplicated an ID,
image-list
, in your HTML. That will not work. IDs need to be unique within a
document.
An ID is like an address. Two 100 Elm Streets (Not E. and W. or
N. and S. and not even "Court" or "Way", but
"Elm Street"...) in the same city is chaos
Surprised that it's the LAST one that works. And, so, curious
what browser you are using?
Most will pick the FIRST. I have always insisted, though, that the
standards do not specify what the browser should do in this case, and
so you should not be surprised if the browser picks:
- the first occurrence
- the last occurrence
- some random occurrence
- or no occurrence at all
It's invalid HTML. What should the browser do with it? The
philosophy of most browsers is to try to do something reasonable
rather than giving some error message or doing nothing. But,
ultimately, the browser cannot read your mind and know what you meant.