Design comparison
Solution retrospective
Any feedback will be appreciated.
Community feedback
- @visualdennissPosted over 1 year ago
Great job in completing the challenge successfully! Your solution looks great overall, the design implementation is simple neat. Both mobile and desktop view respond well to resizing.
However you could reduce the font-size of the h2 content to match the design even more like this:
.content h2 { color: #1f3251; font-weight: 700; padding: 0 0 16px 0; font-size: 20px; }
If this was helpful, feel free to mark it as helpful! Good luck on upcoming projects! 0
Marked as helpful0 - @HassiaiPosted over 1 year ago
Replace<div class="container">with the main tag, <h2> with <h1> and <div class="attribution"> with the footer tag to fix the accessibility issues. click here for more on web-accessibility and semantic html
Always begin the heading of the html with <h1> tag because the <h1> is needed to make the content accessible, wrap the sub-heading of <h1> in <h2> tag, wrap the sub-heading of <h2> in <h3> this continues until <h6>, never skip a level of a heading.
Use the colors that were given in the styleguide.md found in the zip folder you downloaded.
Give .content 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. Give p a margin-top or h1 a margin-bottom value for the space between the text.
There is no need for a media query since you gave .card a max-width value. Give the img a max-width of 100% for a responsive image instead of width.
To center .card on the page using flexbox or grid instead of position: absolute, add min-height:100vh; display: flex; align-items: center: justify-content: center; or min-height:100vh; display: grid place-items: center to the body.
USING FLEXBOX: body{ min-height: 100vh; display: flex; align-items: center; justify-content: center; }
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
There is no need to style .container.
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
Marked as helpful0 - @0xabdulkhaliqPosted over 1 year ago
Hello there π. Congratulations on successfully completing the challenge! π
- I have other recommendations regarding your code that I believe will be of great interest to you.
HTML π·οΈ:
- Your solution generates accessibility error reports due to
non-semantic
markup
- So fix it by replacing the
<div class="container">
with semantic element<main>
and<div class="attribution">
with element<footer>
to improve accessibility and organization of your page.
- Use HTML5 semantic elements such as
<header>
,<nav>
,<main>
,<aside>
, and<footer>
to define these sections
I hope you find it helpful ! π Above all, the solution you submitted is great!
Happy coding!
Marked as helpful0 - @agun36Posted over 1 year ago
.content { padding:1rem; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; } .content p { //remove the color opacity:0.8; font-weight: 400; }
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