Design comparison
Solution retrospective
hello everyone! this is my first challenge if you have any suggestions let me know in the comment
Community feedback
- @HassiaiPosted almost 2 years ago
Replace <div class="mainCard"> with main tag, <h3> with<h1> to fix the accessibility issues. click here for more on web-accessibility and semantic html
There is no need to style .content and .image
To center .maincard on the page using flexbox, add min-height:100vh; display: flex; align-items: center: justify-content: center; to body.
To center .mainCard on the page using flexbox: body{ min-height: 100vh; display: flex; align-items: center; justify-content: center; }
For a responsive content which wont require media query for this challenge, replace the width in .mainCard with max-width and reduce it value for it to be equivalent to the width of the design.
max-width:320px
. Replace the height in .card with a padding value for all the sides, this will prevent the content from overflowing on smaller screens and its a responsive replacement.padding: 15px
.Give the img a max-width of 100% and a border-radius , the rest are not needed.
Give .info a margin value for all the sides, text-align: center and a font-size of 15px which is 0.9375rem, this will be the font-size of both p and h1.
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 helpful1@taioofhPosted almost 2 years ago@Hassiai cool, I didn't know all this, really nice of you to give me your opinions and I appreciate it
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