Suggestion on my first grid layout

Hello everyone im a beginner in css I’ve make this grid layout
any suggestion to improve the code will be appreciated :pray:
this is my codepen link

idk why , when i put it in the codepen it appears like this

I would love to help you. Code is way to advanced for me at this moment. Grid layout is difficult I have heard. The only thing I can see is the alts are not there for the pic, That and the size can make pic not show.

1 Like

hey @aliibra9214 if you are familiar with minmax, repeat, 1fr and auto-fit
you could create the layout you want. grid is just advanced version of flex.

repeat(2,100px) means 2 columns with width of 100px

now take a look at this code snippet

  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));

all this is doing is fitting (auto-fit )max number of cards
with width in between 200px to max width available

HERE IS LIVE EXAMPLE
Responsive CSS grid

1 Like

Hi, I t seems good but the alts for the image are missing, which, combined with the image’s size, may cause it to not display. I also agree with the @ saurabhv749 regarding the width recommendation.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.