@PhoenixDev22
Posted
Hello Stacey,
Congratulation on completing this frontend mentor challenge. Excellent work!I see you have received some incredible feedback , if you don't mind me reiretating some of them:
- You should use
<main>
landmark to wrap the card. HTML5 landmark elements are used to improve navigation experience on your site for users of assistive technology.
- In my opinion, the image is an important content. The alternate text should indicate where the Qr code navigate the user : like
QR code to frontend mentor
not describes the image. Also the alternate text should not be hyphenated, it should be human readable.
- Never use
<div>
and<span>
alone to wrap a meaningful content. Just keep in mind that you should usually use semantic HTML in place of the div tag unless none of them (the semantic tags) really match the content to group together. By adding semantic tags to your document, you provide additional information about the document, which aids in communication. For the reason stated before, in this challenge, you can use<h1>
to wrapcard__title
and<p>
for the description.
<h1 class=”card__title”> Improve your front-end skills by building projects</h1>
<p class=”card__text”> Scan the QR code to visit Frontend Mentor and take your coding skills to the next level</p>
- In order to center the card on the middle of the page , you can use the flexbox properties and
min-height: 100vh
for the<body>
add a little padding to the body that way it stops the card from hitting the edges of the browser. You can remove the unnecessary div.screen-container
. You can removeposition: relative ; z-index: -1
- An element with width:100vw can extend below the vertical scrollbar of your browsers, inducing the apparition of horizontal scrollbars along with an unwanted side scroll. Use width:100% to the body instead will extend across the viewport but will always stop at the scrollbar.
width: 285px;
an explicit width is really not a good way to have a responsive layout . Consider usingmax-width
to the card inrem
instead .
height: 470px;
It's not recommended to set height to component, let the content of the component define the height.
- Consider using rem and em units as they are flexible, specially for font size better to use rem. If your web content font sizes are set in absolute units, such as pixels, the user will not be able to re-size the text or control the font size based on their needs. Relative units “stretch” according to the screen size and/or user’s preferred font size, and work on a large range of devices.
- Remember a css reset on every project. That will do things like set the images to display block and make all browsers display elements the same.
Overall, Your solution looks great . Hopefully this feedback helps.
Marked as helpful
@staceysav
Posted
@PhoenixDev22 thank you for valuable feedback!