Design comparison
Solution retrospective
Hi everyone! How can I improve my code? Is this webpage responsive? Does it look like the original? Any other feedback would be a lot appreciated. Thank you in advance.
Community feedback
- @MelvinAguilarPosted 11 months ago
Hello there ๐. Good job on completing the challenge !
I have other suggestions about your code that might interest you.
- Use semantic elements such as
<main>
and<footer>
to improve accessibility and organization of your page.
- The <br> tag is often used to create line breaks, but it doesn't convey any semantic meaning. When a screen-reader reads the text, it will break the flow of reading at the line break tag, which can be confusing for users. More information here.
- 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! ๐ Above all, the solution you submitted is great!
Happy coding!
Marked as helpful1 - Use semantic elements such as
- @danielmrz-devPosted 11 months ago
Hello, @AlbertoT93!
Your project looks great!
About responsiveness:
-
This project is not responsive since both mobile and desktop versions are the same, so in this case you don't need to worry about that. Responsiveness will be a challenge on the next projects!
-
Also, I noticed that you used
margin
to place your card closer to the middle of the page. I have two easier and very efficient ways to do that without using margins:
You can apply this to the body:
body { height: 100vh; display: flex; justify-content: center; align-items: center; }
or you can apply this to the element you wanna center:
.element { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
I hope it helps!
Other than that, you did a great job!
Marked as helpful1 -
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