First Challenge Fronted with CSS and HTML using hover and nth-child
Design comparison
Solution retrospective
I found difficult the styles like pading, margins, and that, but I learned a lot.
A little bit of the background that the svg image looked good on mobile
is okey if I write comments in the code?
Community feedback
- @HassiaiPosted almost 2 years ago
wrap<div class="attribution"> in a footer tag to fix the accessibility issue.
To center .main-container on the page, add min-height:100vh; display: flex; align-items: center: justify-content: center; or min-height:100vh; display: grid place-items: center to the body.
To center .main-container on the page using flexbox: body{ min-height: 100vh; display: flex; align-items: center; justify-content: center; }
To center . main-container on the page using grid: body{ min-height: 100vh; display: grid; place-items: center; }
Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
Marked as helpful0@Catherine1998Posted almost 2 years ago@Hassiai Thanks I didn't know how to fix the accessibility issue, and thank you for the help to center the main container, also in the future I will use the relative units
0 - @Cyclone3603Posted almost 2 years ago
This looks really cool! But maybe next time, you can add a transition time to your hover effects to make it look smoother. For example:
button{ border: none; border-radius: 10px; background-color: purple; color: white; transition: 200ms; } button:hover{ background-color: lilac; }
This should make the change from a darker color to a lighter color less jarring, and have it fade in.
Marked as helpful0@Catherine1998Posted almost 2 years ago@Cyclone3603 Thanks you for your recommendation of the transitions, I didn't know it, the effect is cool.
1
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