You can *NOT* use the same ID for more than one element on a page.
The fact that your code works even for the first such <div> is just luck: You happened to choose a browser that ignores all but the first such ID. Other browsers wouldn't have worked at all.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.