How would I replicate this?

I recently came across this figma file and found that I like this. I went to code it but am struggling at the responsiveness to it, would would be the layout (flex, grid, ...) for this?
No description
No description
11 Replies
Jochem
Jochemβ€’8mo ago
grid's probably the best solution
DinoTech
DinoTechβ€’8mo ago
heres my current code
Jochem
Jochemβ€’8mo ago
it helps a lot if you share a live version instead of just posting the code here something like codepen or jsfiddle, or even just github pages check out #how-to-ask-good-questions
DinoTech
DinoTechβ€’8mo ago
half of the code just broke what should i do about that then... its just tones of errors
Jochem
Jochemβ€’8mo ago
not sure, tbh. You could try copying the rendered HTML from the dev tools and pasting that along with your CSS? Or use a host that supports the framework you're working with. Stackblitz or jsfiddle should support react if you're setting it up right
DinoTech
DinoTechβ€’8mo ago
Jochem
Jochemβ€’8mo ago
That seems fine to work with! I'll leave the actual help to someone with more experience with tailwind, I'm not really familiar enough with it to change this layout, and I'm heading off for a bit. Hope it's resolved soon πŸ™‚
DinoTech
DinoTechβ€’8mo ago
ok byw
MarkBoots
MarkBootsβ€’8mo ago
not much experience with tailwind. but the main thing is the layout of the 3 components I think something like this will help you on your way
<div class="grid md:grid-cols-[2fr,1fr] gap-1">
<div>description</div>
<div class="md:row-span-2">details</div>
<div>reviews</div>
</div>
<div class="grid md:grid-cols-[2fr,1fr] gap-1">
<div>description</div>
<div class="md:row-span-2">details</div>
<div>reviews</div>
</div>
2 column grid (devided 2fr, 1fr) for medium screensize and above and the details that span over 2 rows
DinoTech
DinoTechβ€’8mo ago
that worked well.. damm thank you
MarkBoots
MarkBootsβ€’8mo ago
no problem, you're welcome