@Bayoumi-dev
Posted
Hey Ashley,
My suggestions:
- To fix the
view-icon
transparent... Usebackground-color: hsla(178, 100%, 50%, 0.5);
instead ofbackground-color: hsl(178, 100%, 50%);
and changeopacity: 0.5;
toopacity: 1;
.overlay {
//...
background-color: hsla(178, 100%, 50%, 0.5); /* changed */
}
.overlay:hover{
opacity: 1; /* changed */
cursor: pointer;
}
Documents must have <title> element
Uncomment
<title>Frontend Mentor | NFT preview card component</title>
Document should have one main landmark
, Contain the component with<main>
.
<main>
<div class="card_container">
//...
</div >
</main>
-
Page should contain a level-one heading
, Changeh2
toh1
You should always have oneh1
per page of the document... in this challenge, you will useh1
just to avoid theaccessibility issue
that appears in the challenge report... but don't useh1
on small components<h1>
should represent the main heading for the whole page, and for the best practice use only one<h1>
per page. -
All page content should be contained by landmarks
, Contain the attribution with<footer>
.
<footer>
<div class="attribution">
//...
</div>
</footer>
- I suggest you center the component on the page with
Flexbox
, by giving the parent element<main>
the following properties:
body{
background-color: hsl(217, 54%, 11%);
color: white;
/* padding: 120px 25px 120px 25px; <---Rmove */
font-family: 'Outfit', sans-serif;
font-size: 1rem;
}
main { /* <--- Add */
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
Some Resources
- How to Center Anything with CSS - Align a Div, Text, and More
- 11 Ways to Center Div or Text in Div in CSS
Hope this is helpful to you... Keep coding👍
Marked as helpful
@Bayoumi-dev Thank you so much for your detailed review of my code and for all of the feedback! I will implement your suggestions into my project.
@Bayoumi-dev
Posted
@aszcoding You're welcome 😊