We’re going to need a little more to go on. Please paste your updated code in here so we can see exactly what you are doing.
To post your code in this forum you need to wrap it in triple back ticks. On a line by itself type three back ticks. Then on the first line below the three back ticks paste in your code. Then below your code on a new line type three more back ticks. The back tick on my keyboard is in the upper left just above the Tab key and below the Esc key.
Back ticks, not back slashes. You can also click the </> icon right above the editor and it will give you single back ticks to put your code in. They might not be as good as triple back ticks but will probably do.
What you did here is you closed the container div immediately so the marker divs aren’t nested in it any more. You want to close the container div after the marker divs so that the are nested.
Yes, in your first code the markers are all inside the container. The problem with your first code is that the markers are also nested within each other too (the second marker is inside the first and the third is inside the second). The markers should all be at the same level. They should be siblings (next to each other, not nested).