My goal is to achieve a design similar to the image below:
https://i.sstatic.net/286GX.png
I have been advised to use Flexbox for this design. Despite trying various approaches, I am struggling to maintain consistent box sizes. I have a dataset called data
which contains all the necessary information:
[
{
"name": "action",
"img": "action.jpg",
"status": "NO"
}
{
"name": "Aldi",
"img": "aldi.jpg",
"status": "YES"
}
]
The part that is tripping me up the most is the CSS. I can't figure out how to keep the boxes separate. I have created a main div with a gray background and attempted to loop through the data to create a flexbox for each item but it doesn't display correctly. I feel like I'm approaching the problem in the wrong way. Can someone demonstrate how to create these boxes for each element of the data? Please exclude instructions on creating the button, as I'd like to try that myself. My main struggle lies in styling the body of the blocks.