Design comparison
Solution retrospective
This is my first time writing HTML & CSS from scratch. I know I have a long way to go. Please suggest any improvements I could make to the CSS, I tried to keep things simple.
Community feedback
- @0xabdulkhaliqPosted over 1 year ago
Hello there π. Congratulations on successfully completing the challenge! π
- I have other recommendations regarding your code that I believe will be of great interest to you.
CSS π¨:
- Looks like the component has not been centered properly. So let me explain, How you can easily center the component without using
margin
orpadding
.
- We don't need to use
margin
andpadding
to center the component both horizontally & vertically. Because usingmargin
orpadding
will not dynamical centers our component at all states
- You already using
Flexbox
for layout, but you didn't utilized it's full potential. Just add the following rules to properly center the component.
body { min-height: 100vh; justify-content-center; align-items: center; }
- Now remove these styles, after removing you can able to see the changes
.outer { margin: 20px auto; }
- Now your component has been properly centered
.
I hope you find this helpful π Above all, the solution you submitted is great !
Happy coding!
Marked as helpful1@jlkoenPosted over 1 year ago@0xAbdulKhalid Thank you very much for the feedback. I will add those changes and see how it looks.
0 - @NehalSahu8055Posted over 1 year ago
Hello Coder π.
Congratulations on successfully completing the challenge! π
Few suggestions regarding design.
-
Remove margins from
.outer
as this will not dynamically center the card and addmin-height:100vh
to properly center the card. -
Use
Semantics
for the proper design of your code.
<main>...</main> <footer>...</footer> wrap up `.attribtution` div inside your footer. </body>
-
For
non-decorative images
give meaningful and descriptive alt likealt= "QR code to frontend mentor website"
. -
Use
responsive units(rem, em, %)
from next project. Explore respective use cases on google. -
Replace
width
withmax-width
to make your card more responsive.
link.
I hope you find this helpful.
Happy codingπ
Marked as helpful1@jlkoenPosted over 1 year ago@NehalSahu8055 Thank you for the detailed reply. I'll have a look at responsive units, haven't used those before.
1 -
- @Aaryn-RobinsonPosted over 1 year ago
Good Job, John. Responsive on my end . Id download the design files provided by the platform so you can get the font-sizes and margins.Change the font weight on the paragraph and the text color and its perfect. But this is a great start! Being that it's your first time writing HTML and CSS you will only get better. Good job!
Marked as helpful0
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