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•11mo ago
grid's probably the best solution
DinoTech
DinoTech•11mo ago
heres my current code
Jochem
Jochem•11mo 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•11mo ago
half of the code just broke what should i do about that then... its just tones of errors
Jochem
Jochem•11mo 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•11mo ago
Jochem
Jochem•11mo 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•11mo ago
ok byw
MarkBoots
MarkBoots•11mo 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•11mo ago
that worked well.. damm thank you
MarkBoots
MarkBoots•11mo ago
no problem, you're welcome
Want results from more Discord servers?
Add your server