Design comparison
Solution retrospective
Hi, This is my first challenge on Forntend Mentor.I think Design is OK but it doesnt scale accordingly to browser size.Any leads would be helpful.
Community feedback
- @anisgoPosted about 3 years ago
hello, change the
h2
tag toh1
and addfont-family: "Big Shoulders Display"
. andfont-family: "Lexend Deca"
inp
tagMarked as helpful0 - @mickygingerPosted about 3 years ago
Hi Greeshma! 👋
First of all, this looks great, so well done! 🎉
You're always going to have difficulties when using absolute positioning for layout, so I would strongly advise against it. Absolute positioning is good when you want to position something over the top of something else, and in relation to it. If you look at the notification bell icon on Frontend Mentor, you'll see that there's a red notch that appears indicating how many unread notifications you have. That's absolutely positioned, but mostly we use flexbox or grid to position our elements on the page.
You can position your order summary component by with flexbox like so:
body { margin: 0; } .main-block { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; }
Then remove
position: absolute
andleft: 36%
from.sub-block
.Here's a great guide to flexbox by CSS-Tricks.
Hope that helps! 😀
Marked as helpful0@greeshmaymPosted about 3 years ago@mickyginger The link you have provided is very helpful, I will definetly improvise the code.Thank you so much for taking time and giving me a feedback.
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