Ahmed Bayoumi
@Bayoumi-devAll comments
- @shine2024@Bayoumi-dev
Hey Tadem, Congratulations on completing this challenge... You have
accessibility issues
that need to fix.Document should have one main landmark
, Contain the component with<main>
.
<main> <div class="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 use
REM
for font size, It is a must for accessibility because px in some browsers doesn't resize when the browser settings are changed... See this article ---> CSS REM – What is REM in CSS? -
Also, I suggest you look into an approach called
"BEM"
Block Element Modifier
Hope this help!... Keep coding👍
- @sujeong054@Bayoumi-dev
Hey Sujeong, It looks good!... Here are some suggestions:
Document should have one main landmark
, Contain the component with<main>
.
<main> <div class="card"> //... </div> </main>
- Use
<a>
to wrapEquilibrium #3429
andJules Wyvern
, then addcursor: pointer;
to the<a>
, The cursor indicates to users there is an action that will be executed when clicking on it.
Equilibrium #3429
---> Navigate the user to another page to see the NFTJules Wyvern
---> Navigate the user to another page to see the creator's portfolio- To do the active state for the image on the NFT preview card I suggest you wrap the image of the NFT with the
img-wrapper
element and create another element to make itoverlay
on the image, it contains theview icon
.
<div class="img-wrapper"> <img class="card-img" src="images/image-equilibrium.jpg" alt="Image Equilibrium"> <div class="overlay"><img src="images/icon-view.svg" alt=""></div> </div>
Then add the following styles:
.img-wrapper { width: ...; /* it's up to you */ height: ...; /* it's up to you */ position: relative; /*To flow the child element on it*/ cursor: pointer; overflow: hidden; } .img-wrapper .card-img{ width: 100%; height: 100%; } .overlay { background-color: hsla(178, 100%, 50%, 0.5); display: flex; /* Center the view icon with flexbox*/ align-items: center; justify-content: center; position: absolute; top: 0; width: 100%; height: 100%; opacity: 0; } .img-wrapper:hover .overlay { opacity: 1; }
There is another way to do the active state for the image on the
NFT preview card
by creatingpseudo-elements
(::after
,::before
) to use one as anoverlay
and other forview-icon
.Resources
- How to Center Anything with CSS - Align a Div, Text, and More
- 11 Ways to Center Div or Text in Div in CSS
- Pseudo-elements
- ::after (:after)
- ::before (:before)
Hope this is helpful to you... Keep coding👍
Marked as helpful - @clispy1@Bayoumi-dev
Hey! It looks good!... You have
accessibility issues
that need to fix.Document should have one main landmark
, Contain the component with<main>
.
<main> <div class="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>
Buttons must have the discernible text
, So don't leave thealt
attribute empty when using the image<img>
inside the button<button>
without text.
Or set the attribute<button class="change"> <img src="./images/icon-dice.svg" alt="Advice Generator"> </button>
aria-label
to describe the button.
Hope this help!... Keep coding👍
- @shehabshalan@Bayoumi-dev
Hey Shehab, It looks good!... You have
accessibility issues
that need to fix.- Documents must have <title> element to aid in navigation
<head> //... <title>3-column preview card component | Frontend Mentor</title> </head>
- Using more than one
<h1>
is allowed by the HTML specification, but is not considered a best practice. Using only one<h1>
is beneficial for screenreader users.
---> Multiple
<h1>
elements on one pageI hope this is helpful to you... Keep coding👍
- P@HeavyMetalCoffee@Bayoumi-dev
Hey John, It looks good!... Here are some suggestions:
Document should have one main landmark
, Contain the component with<main>
.
<main class="container"> <div class="qr_code_card"> //... </div> </main>
-
Page should contain a level-one heading
, Change<p class="p1">
to<h1 class="heading">
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. -
You have used
grid
to center the component on the page, but you need to set the height of thecontainer
--->min-height: 100vh;
to center it at this height:
.container { display: grid; justify-content: center; align-items: center; /* width: 1440px; /* <---- Remove */ /* height: 800px; /* <---- Remove */ min-height: 100vh; /* <--- Add */ }
- Use
REM
for font size, It is a must for accessibility because px in some browsers doesn't resize when the browser settings are changed... See this article ---> CSS REM – What is REM in CSS?
Hope this help!... Keep coding👍
Marked as helpful - @superschooler@Bayoumi-dev
Hey Brian, It looks great!... Here are some suggestions:
- Instead round each corner and create media queries to change it based on the screen size, Give the parent these classes
rounded
,overflow-hidden
<main class="container rounded overflow-hidden" id="container"> //... </main>
- Using more than one
<h1>
is allowed by the HTML specification, but is not considered a best practice. Using only one<h1>
is beneficial for screenreader users.
---> Multiple
<h1>
elements on one pageHope this help!... Keep coding👍
Marked as helpful - Instead round each corner and create media queries to change it based on the screen size, Give the parent these classes
- @thejackshelton@Bayoumi-dev
Hey Jack, It looks good!... You have
accessibility issues
that need to fix.Document should have one main landmark
, Contain the component with<main>
.
<main> <div class="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 align items by using
margin
andpadding
instead ofposition
--->Alignment, margin, padding -
Use
REM
for font size, It is a must for accessibility because px in some browsers doesn't resize when the browser settings are changed... See this article ---> CSS REM – What is REM in CSS?
Hope this help!... Keep coding👍
Marked as helpful - @Etinhandy@Bayoumi-dev
Hey Etinhandy, Congratulations on completing this challenge... Here are some suggestions:
Document should have one main landmark
, Contain the component with<main>
.
<main id="page-holder> <div class="container"> //... </div> </main>
-
Page should contain a level-one heading
, Changeh2
toh1
You should always have oneh1
per page of the document...<h1>
should represent the main heading for the whole page, and for the best practice use only one<h1>
per page. -
I suggest you put
the socials
into thelist item
to add moresemantics
to your project...
<ul class="socials"> <li class="icons"><a href="https://www.facebook.com/"><img src="./images/facebook.svg" alt="facebook"></a></li> <li class="icons"><a href="https://www.twitter.com/"><img src="./images/twitter.svg" alt="twitter"></a></li> <li class="icons"><a href="https://www.instagram.com/"><img src="./images/instagram.svg" alt="instagram"></a></li> </ul>
Hope this help!... Keep coding👍
Marked as helpful - @Chandra30sekhar@Bayoumi-dev
Hey! Here are some suggestions:
Document should have one main landmark
, Contain the component with<main>
.
<main> <div class="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. -
Use
REM
for font size, It is a must for accessibility because px in some browsers doesn't resize when the browser settings are changed... See this article ---> CSS REM – What is REM in CSS?
I hope this is useful to you... Keep coding👍
Marked as helpful - @sammingty@Bayoumi-dev
Hey! Congratulations on completing this challenge... Here are some suggestions:
Document should have one main landmark
, Contain the component with<main>
.
<main> <div class="container ..."> //... </div> </main>
-
Page should contain a level-one heading
, Change<span class="name">Victor Crest</span>
to<h1 class="name">Victor Crest</h1>
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. -
Use
REM
for font size, It is a must for accessibility because px in some browsers doesn't resize when the browser settings are changed... See this article ---> CSS REM – What is REM in CSS? -
I suggest you put the status of the profile card into the
list item
to add moresemantics
to your project...
<ul class="stats"> <li><span class="stats-num">80K</span>Followers</li> <li><span class="stats-num">803K</span>Likes</li> <li><span class="stats-num"> 1.4K</span>Photos</li> </ul>
Hope this help!... Keep coding👍
Marked as helpful - @sushant2313@Bayoumi-dev
Hey Sushant, Congratulations on completing this challenge... Here are some suggestions:
Document should have one main landmark
, Contain the component with<main>
.
<main> <div class="grid"> //... </div> </main>
-
An
img
element must have analt
attribute, to provide alternative information for an image if a user for some reason cannot view it. -
All page content should be contained by landmarks
, Contain the attribution with<footer>
.
<footer> <div class="attribution"> //... </div> </footer>
-
Use
REM
for font size, It is a must for accessibility because px in some browsers doesn't resize when the browser settings are changed... See this article ---> CSS REM – What is REM in CSS? -
I suggest you center the component on the page with
Flexbox
, by giving the parent element<main>
the following properties:
body { background-color: hsl(30, 38%, 92%); /* margin: 150px; /* <---- Remove */ //... } main { /* <--- Add */ display: flex; justify-content: center; align-items: center; min-height: 100vh; } .grid { background-color: #fff; /* margin: 0 auto; /* <---- Remove */ //... }
Hope this help!... Keep coding👍
Marked as helpful - @ashutoshbisoyi@Bayoumi-dev
Hey Ashutosh, It looks good!... Here are some suggestions:
Document should have one main landmark
, Contain the component with<main>
.
<main> <div class="container flex-center"> //... </div> </main>
-
Add
cursor: pointer;
to thebutton
, The cursor indicates to users there is an action that will be executed when clicking on it. -
Use
REM
for font size, It is a must for accessibility because px in some browsers doesn't resize when the browser settings are changed... See this article ---> CSS REM – What is REM in CSS?
I hope this is helpful to you... Keep coding👍
Marked as helpful - @HugoMoncada@Bayoumi-dev
Hey Hugo, It looks good!... Here are some suggestions:
- Use
<button class="dice-div">
instead of<div class="dice-div">
... Buttons are used for actions.
<button class="dice-div"> <img class="dice" src="/images/icon-dice.svg" alt="Advice Generator"> </button>
-
Use the
quotation
element instead of theheading
element to add more semantics to your project... ---><q>: The Inline Quotation element
-
Use
REM
for font size, It is a must for accessibility because px in some browsers doesn't resize when the browser settings are changed... See this article ---> CSS REM – What is REM in CSS?
Hope this help!... Keep coding👍
- Use
- @End-Dev-web@Bayoumi-dev
Hey! Congratulations on completing this challenge... You have
accessibility issues
that need to fix.Document should have one main landmark
, Contain the component with<main>
.
<main> <div class="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.- Use
REM
for font size, It is a must for accessibility because px in some browsers doesn't resize when the browser settings are changed... See this article ---> CSS REM – What is REM in CSS?
Hope this help!... Keep coding👍
Marked as helpful - @gabrielbarrosg@Bayoumi-dev
Hey Gabriel, It looks good!... Here are some suggestions:
Document should have one main landmark
, Contain the component with<main>
.
<main> <div id="advice"> //... </div> </main>
- An
img
element must have analt
attribute, to provide alternative information for an image if a user for some reason cannot view it, but in this case, add an emptyalt
attribute to avoid the accessibility issue because it is an unnecessary icon for the content.
<img class="divider" src="assets/images/pattern-divider-desktop.svg" alt="">
- use
<button onclick='generateAdvice()' id="advice-btn">
instead of<div onclick='generateAdvice()' id="advice-btn">
... Buttons are used for actions
<button onclick='generateAdvice()' id="advice-btn"> <img class="btn" src="assets/images/icon-dice.svg" alt="Advice Generator"> </button >
-
Page should contain a level-one heading
, Changeh3
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. -
Use
REM
for font size, It is a must for accessibility because px in some browsers doesn't resize when the browser settings are changed... See this article ---> CSS REM – What is REM in CSS?
Hope this help!... Keep coding👍
Marked as helpful - @devendra-dantal04@Bayoumi-dev
Hey! Congratulations on completing this challenge... You have an
accessibility issue
that needs to fix.Document should have one main landmark
, Contain the component with<main>
.
<main> <div class="container"> //... </div> </main>
Hope this help!... Keep coding👍
Marked as helpful - @JoseTomas-GP95@Bayoumi-dev
Hey Tomas,
My suggestions:
- Using more than one
<h1>
is allowed by the HTML specification, but is not considered a best practice. Using only one<h1>
is beneficial for screenreader users. --- Multiple<h1>
elements on one page - Add
cursor: pointer;
to thebutton
, The cursor indicates to users there is an action that will be executed when clicking on it.
I hope this is helpful to you... Keep coding👍
Marked as helpful - Using more than one
- @lalvarezz@Bayoumi-dev
Hey Laura, I suggest you put the status of the profile card into the
list item
to add moresemantics
to your project,Div
's don't do much for semantics but a list is much more meaningful..:<ul class="stats"> <li><span class="stats-num">80K</span>Followers</li> <li><span class="stats-num">803K</span>Likes</li> <li><span class="stats-num"> 1.4K</span>Photos</li> </ul>
I hope this is useful to you... Keep coding👍
Marked as helpful