Why aren't these grid elements moving next to each other?
I'm using the following scheme in a 3-column grid layout:
Articles are the text blocks seen in the image.
3 Replies
You will probably need to provide more context. HTML and CSS. Ideally in a codepen.
That said, from the little code that you have shown, the article is defined after the image. Si, if the image is set to be in the last cell of the grid row, the article will automatically start on the next row.
If you want it on the same row you will either have to move it before the image in the markup or, probably what you are looking for, set the article grid-row to 1.
An alternative method would be to define grid-template areas.
yeah as Chris said you gotta specify the row for them or go with the areas 🙂
by default the element will jump to the next row