Design comparison
Community feedback
- @HassiaiPosted almost 2 years ago
Replace<div class="main">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
For a responsive content which wont require a media query for this challenge, give .main a max-width and reduce value.
max-width:20rem which is 320px
.To center .main on the page using flexbox, replace the height in the body with min-height: 100vh.
Give h1 and p the same font-size of 15px which is 0.9375rem and the same margin-left and margin-right values.
margin: 1rem
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
0 - @MelvinAguilarPosted almost 2 years ago
Hello π. Congratulation on successfully completing your first challenge π ! !
I have some recommendations regarding your code that I believe will be of great interest to you.
HTML π:
- Use semantic elements such as
<main>
and<footer>
to improve accessibility and organization of your page.
- You should not use inline-CSS because it is not a good practice. Instead, you should use an external stylesheet to style your page. By doing this, you will be able to have a better organization of your code and will be able to understand it better.
CSS π¨:
- Instead of using pixels in font-size, use relative units like
em
orrem
. You can read more about this here π.
- Use
min-height: 100vh
instead ofheight: 100vh
. Theheight
property can cause your component to be cut off on small screens, such as a mobile phone in landscape mode.
CSS Reset π:
-
You should use a CSS reset. A CSS reset is a set of CSS rules that are applied to a webpage in order to remove the default styling of different browsers.
CSS resets that are widely used:
I hope you find it useful! π Above all, the solution you submitted is great!
Happy coding!
0 - Use semantic elements such as
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