Mobile first NFT preview card component using flexbox
Design comparison
Solution retrospective
I tried to use semantic HTML, did I use the tags correctly? How else can I center the icons(the clock and the Ethereum) in the middle with the text next to them?
Community feedback
- @Bayoumi-devPosted over 2 years ago
Hey!
Here are some suggestions:
Document should have one main landmark
, Contain the component with<main>
.
<main> <section class="container"> //... </section> </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>
- An
img
element must have analt
attribute, to provide alternative information for an image if a user for some reason cannot view it.
<img src="images/image-avatar.png alt="Jules Wyvern's picture">
- I suggest you center the component on the page with
Flexbox
, by giving the parent element<main>
the following properties:
main { display: flex; justify-content: center; align-items: center; min-height: 100vh; }
Hope this help!... Keep coding👍
Marked as helpful1@Illyaas4ShowPosted over 2 years ago@Bayoumi-dev Thank you so much! I had these same problems in my previous solutions but I never quite understood what it meant. You have been the biggest help to me on Front-end Mentor since I started. Thank you! If I have any more questions later on, I can ask you for help, if that is alright with you.
0 - @Illyaas4ShowPosted over 2 years ago
For some reason, the screenshot generated is not what the site that I produced looks like! Is there I way to use my own screenshot??
0
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