Design comparison
Solution retrospective
I've been learning HTML, CSS, and Javascript for the last 2-3 weeks. I want to continue learning web development. I didn't include any accessibility because I've just recently learned of these practices. What are some best practices to include accessibility for these challenges or good resources to learn more?
Thank you
Community feedback
- @HassiaiPosted almost 2 years ago
Replace the first<div class="container">with the main tag and <div class="attribution"> with the footer tag to fix the accessibility issues. click here for more on web-accessibility and semantic html
Change the class name of the second t<div class="container"> or wrap all the content in the main tag without a div separating them. e.g.:
<main><img><h1></h1><p></p></main>
or<main> <img> <div class=" container_text"> <h1></h1> <p></p></div> </main>
.Give the body a background-color, Use the colors that were given in the styleguide.md found in the zip folder you downloaded.
To center the 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 the main on the page using flexbox: body{ min-height: 100vh; display: flex; align-items: center; justify-content: center; }
To center the main on the page using grid: body{ min-height: 100vh; display: grid; place-items: center; }
Give the main a width value and a padding value for all the sides, give the img a max-width of 100%.
width:320px , padding: 15px
.Give h1 and p the same font-size of 15px, text-align: center, the same margin-left, margin-right and margin-top values. Give p a margin bottom value.
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
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