I want to create new div elements when the page loads. These elements are displayed as an ordered group, which changes depending on the external data from the JSON file. I need to do this with a for loop because more than 100 divs are required.
So, I need to be able to modify each div created in terms of height, width, top / left corner and so on. However, document.getElementById("created_div").style.whatever it is, I donβt even see any new div appear. I set the new divs height / width to 500px, background to "red" and so on, but no new divs definitely appear.
What am I doing wrong?
javascript dom
Erik Nelson Dec 30 2018-12-12T00: 00Z
source share