Design comparison
Solution retrospective
A challenge I had with this project was figuring out the proper way to separate my code so it is cohesive to anyone reviewing, as well as whether it followed the correct semantical order.
Another issue I had was being unsure if I was using units in order to adjust the position of my components. Should I be using px? rem? em? What is most recommended when designing a webpage so everything stays where I would want it to be.
Community feedback
- Account deleted
@dweemon, good job on completing the challenge. It would be a good idea and great practice to play around with
sr-only
for accessibility purposes it's essentially for screen readers, you've already done it by putting text on you image using thealt
tag. You can do a very simple one using theh1
tag element simply give it a class name ofsr-only
then put this code in your css:.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: hidden; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }
this won't be seen on screen but will be read out loud to people who are blind or have other disabilities that are using screen readers.
1 - @MelvinAguilarPosted 12 months ago
Hello there ๐. Good job on completing the challenge !
I have other suggestions about your code that might interest you.
-
Wrap the page's whole main content in the
<main>
tag. -
Instead of using pixels in font-size, use relative units like
em
orrem
. The font-size in absolute units like pixels does not scale with the user's browser settings. Resource ๐.
I hope you find it useful! ๐
Happy coding!
1 -
- @dboca93Posted 12 months ago
Hello @dweemon,
Congratulations on submitting this task. Instead of playing around with position and then amending the margin, it would be easier to use a main inside the body element (that has the rest of the code in it) with the following code:
main { width: 100vw; min-height: 100vh; display: flex; align-items: center; justify-content: center; }
This might be easier, especially going into the future, I remember not finding out about viewport units quiet late, this will hopefully make it much easier for you !
1
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