Design comparison
Solution retrospective
Put your remark on this project and tell me how i can write better html and css for this project.
Community feedback
- @PhoenixDev22Posted almost 3 years ago
Hello @khshakib ,
I have some suggestions regarding your solution:
-
First of all , I would suggest to have a separate file for the styles.
-
The element footer must not appear as a descendant of the header element.(no need for header here )
-
There should be two landmark components as children of the body element - a
main
(which will be the NFT card ) and afooter
(which will be the attribution).<Footer>
should be in the<main >
read more about A simplified web page, might look something like this:- Anything with a hover style in a design means it's interactive. you need to add an interactive element
<a>
around the imageEquilibrium #3429, Jules Wyvern
and the hover effects on them.
- Anything with a hover style in a design means it's interactive. you need to add an interactive element
-
For any decorative images, each img tag should have empty
alt=""
andaria-hidden="true"
attributes to make all web assistive technologies such as screen reader ignore those images in(icon-view, icon-ethereum, icon-clock
). -
the avatar 's alt shouldn't be
avatar
, you can set toJules Wyvern
. -
the link should be wrapping the original image and either have
Sr-only
text, anaria-label
oralt
text that says where that link takes you. -
You can use an unordered list
<ul>
to wrapclass="details"
and in each<li>
, there would be<img >
and<p>
(to wrap the text ). Then you can use flexbox properties to align them centrally. -
For this part don't use span for meaningful elements, it would be better like this :
<div class=""> <img src="images/image-avatar.png" alt=""> <p class="primary"> Creation of <a class="main">Jules Wyvern</a> </p> </div>
-
No need for this
<hr class="line">
, you can useborder-top
to the avatar's part. -
I recommend to use
em
andrem
units .Bothem
andrem
are flexible, Usingpx
won't allow the user to control the font size based on their needs. -
Never use
px
for font size. -
width: 350px;;
an explicit width is not a good way . Remove the width from the main component and change it tomax width
instead. That will let it shrink a little when it needs to. -
In
height: 100vh;
, better use min-height: 100vh; allow the body to set a minimum height value based upon the full height of the viewport. This also allows the body to to grow taller if the content outgrows the visible page.
Overall, your solution is good, Hopefully this feedback helps.
Marked as helpful0 -
- @GitHub-dev12345Posted almost 3 years ago
Congratulation 😊🚀 complete the course Reduce the accessibility change the course - change this code
```<footer class=
footer
>` to <footer>`` ( Used only Footer tag for footer design)0 - Account deleted
Hello there! 👋
Congratulations on finishing your challenge! 🎉
I have some feedback on this solution:
- reset the body margin to 0
- you can add the image and background color on hover with pseudo elements
:before & ::after
if you are not sure what i am talking about you can learn from my example
i hope this is helpful and goodluck!
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