Design comparison
Solution retrospective
I learned how to create a responsive layout with CSS Grid.
What challenges did you encounter, and how did you overcome them?It was a challenge to structure the responsive grid layout and to get its constraints right.
What specific areas of your project would you like help with?border-top
creates those curved borders.
How to create such straight borders like in the mockup?
Community feedback
- @MikDra1Posted 3 months ago
Nice one @MichaHuhn π
If you are curious how you can do this straight lines here is a tip:
Create another element in each of the cards. Then position this element absolute. Card should be positioned relative. At the end you need to give this element a height of 3px width of 100% and top 0 and left 0
If this comment was useful please mark it as helpful π
Good job and keep going πππ
Marked as helpful0 - @JomagenePosted 3 months ago
@MikDra1, @Micha Huhn
Thank you for the tips. I found something similar but prefer it over creating a new element. It involves using the
::before
pseudo-class, which eliminates the need to add another HTML element. Here's an example:div::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 0.25rem; background-color: $color; }
The parent of the
div
must be relative of course.What do you think?
0@MikDra1Posted 3 months ago@Jomagene
Youβre right, it is also a solution to the problem πππ
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord