Javascript gallery won't format until i resize document

For some reason, my document is displaying improperly, but when I adjust the size in editor, it seems to reformat into the proper format. How can I make the document format this way from the beginning?

my code : https://codepen.io/daniel-albano/pen/ExaMZjm?editors=0110

What do you call improper? Just saw your link. It looks nice.

1 Like

They are displaying stacked on top of each other until you resize the page

You see this because you do not call the resizeAll function unless the window has been resized. You need to call also call it once the DOM has loaded.

1 Like

What could I change the resize element to in order to make this happen right away?

Did you write the current code you have? If so, then you should already know how to create add and event listener to check for the DOMContentLoaded event. If not, then you should do some research on how to add an event listener for specific events and how to call a function for the event.