In the web browser, the gallery images that were arranged neatly in rows are now stacked on the left side of the webpage.
The CSS display value that arranged the images, flex, has been removed. In addition to other capabilities, flex can be used to easily align multiple page elements horizontally.
In the example code below, there is a div with class
To make children of the div align horizontally on the webpage, in CSS we can use:
Children elements of the div with class
parent will now align horizontally. We can make sure no child element moves off the page by using
Finally, to center rows of children elements, we can use