this is my real first try to use media query and it was a disaster
Design comparison
Solution retrospective
for my first time using media query i think it wasn't that bad i just need to get to used to it and practice more
What specific areas of your project would you like help with?i need some help with my media querys and i need another way to do the section between the footer and the "Your User" section because the way i did it wasnt practical at all
Community feedback
- @kodan96Posted 7 months ago
hi there! ๐๐
Instead of adding margin to all the child elements you can just add padding to the parent container, and that will line up your text nicely.
Also it's a good idea to set
margins
andpaddings
using relative units (em, rem, ch, etc), since usually their size depends on the element's size (headings for example usually have their ownfont-size
as margins above and below them, unless they are extremely large)And I wouldn't use hard-coded values (pixels) for setting
width
orheight
.Actually don't even set them. Parent elements will always include child element's content by default, it's better to let the child elements determine the height of the parent, hard-coding heights can cause overflow.Hope this was helpful ๐
Good luck and happy coding! ๐ช
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