Design comparison
Solution retrospective
Next time I would make the page respond differently to different screen sizes.
What challenges did you encounter, and how did you overcome them?Figuring out how to center vertically, so I had to settle for using margin-top and margin-bottom.
Community feedback
- @DylandeBruijnPosted 3 months ago
@jaliecac
Hiya! 👋
Congratulations on your solution, it looks very close to the design! I can tell you put a lot of effort into it.
Things you could improve ✍️
-
I suggest adding a bit of
padding
to yourbody
element so the card has some space around it on smaller viewports. -
Try experimenting with the CSS layout tool Flexbox, it will help you greatly structuring elements on your webpage.
-
You could add a
min-height: 100vh
to yourbody
element so it takes up the full height of the viewport while still being able to grow when the content inside it grows. -
Try experimenting with CSS variables, they help you make your CSS values more reusable across your code.
-
I suggest using clear descriptive CSS classes like
.card
,.card-title
and.card-description
. -
Try using semantic HTML elements like
main
,section
andarticle
. -
Try using using relative CSS units like
rem
andem
they make your layout more adaptable. -
Try styling your elements using classes instead of ID’s. Most of the time they are the better choice. ID’s are mostly used to select elements using JavaScript, navigation on the page itself and to style unique elements.
I hope you find my feedback helpful! 🌟
Let me know if you have more questions and I'll do my best to answer them. 🙋♂️
Happy coding! 😎
Marked as helpful1@jaliecacPosted 3 months ago@DylandeBruijn
Thanks heaps for the feedback, I'll definitely look into those things you've suggested, especially to do with the layout and using CSS classes. I haven't done that before so it will be good to learn about it and make some of my code more reusable.
Thanks again!
0 -
- @happyrwPosted 3 months ago
This css codes (#sentence1 { font-size: 22px; line-height: 120%; letter-spacing: 0px; font-family: "Outfit", sans-serif; font-weight: bold; color: #1F314F; }
#sentence2 { font-size: 15px; line-height: 140%; letter-spacing: 0.2px; font-family: "Outfit", sans-serif; color:#68778D; }
body { background-color:#D5E1EF; }
#back { margin: auto; margin-top: 10%; margin-bottom: 10%; width:fit-content; padding: 15px; background-color: white; text-align: center; border-radius: 20px; }
img { border-radius: 10px; }) I didn't see any @media query for responsiveness. What going on? But if he is a he, he did a good job. Other wise she did a good job.😁
Marked as helpful0@jaliecacPosted 3 months ago@happyrw
Hi! I haven't actually heard of @media before but just did a quick google search and will read a bit more about it as it seems to be important for CSS. Thankyou for bringing it to my attention!
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