@anisgo
Posted
hello, change the h2
tag to h1
and add font-family: "Big Shoulders Display"
.
and font-family: "Lexend Deca"
in p
tag
Marked as helpful
Looking to hire developers?
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.
@anisgo
Posted
hello, change the h2
tag to h1
and add font-family: "Big Shoulders Display"
.
and font-family: "Lexend Deca"
in p
tag
Marked as helpful
@mickyginger
Posted
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
and left: 36%
from .sub-block
.
Here's a great guide to flexbox by CSS-Tricks.
Hope that helps! 😀
Marked as helpful
@greeshmaym
Posted
@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.
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