Design comparison
Solution retrospective
I am happy i have tried
What challenges did you encounter, and how did you overcome them?I found it hard to hard to make it responsive
What specific areas of your project would you like help with?I would like to make it responsive
Community feedback
- @geomydasPosted 5 months ago
First of all, don't set a fixed width on most elements. You should only use fixed width for very very small items such as a profile picture whose dimensions is 35px x 35px but do not set a fixed width to a container or element that is guaranteed to get small at a certain screen size.
What you would do is set both width and a max-width. The width should be in responsive units such as vw, % or rem but the most reccomended is %. Rem kinda is unresponsive and vw makes things super small. After setting a width in relative units, set a fixed unit for your max-width (px) is the most used one.
Here is what the code would look like, you could use any number but this is just an example {width: 95%; max-width: 350px}.
Second of all, don't use divs and spans for everything out there. Accesibility and semantic matters. Use this for learning semantic html https://www.w3schools.com/html/html5_semantic_elements.asp or https://www.freecodecamp.org/news/semantic-html5-elements/.
You should use the most appropriate element if possible and do not use divs unless absolutely necessary. Use main, header, footer, section as an alternative for divs. You only use div when the info is not necessary.
Third, why the hell is the body element in each css selector. The CSS code is very messy.
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