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