Resolved: How can I align a text-box next to a grid item?

In this post, we will see how to resolve How can I align a text-box next to a grid item?

Question:

Im learning more about grids in CSS. I have created a grid of four images and a textbox that describes the images. I cannot get the items to align next to each other. I want to have the textbox on the left side and the images on the right but I cannot get it to align next to each other. The images are slightly on the right but it’s sitting low. How can i get the grid images to align next to the textbox? (text on left and images on right)


Best Answer:

You should use the .flex-box as the container of both text and grid images. I also add margin-left: 100px to the grid since it has transform that overflows:


If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com