Design comparison
Solution retrospective
I struggled with the rounded corners at the bottom. Is there a better, more elegant way than my current hacky implementation?
Can I streamline my CSS any? I feel like a lot of my rules got verbose, or I have too many rules.
Community feedback
- @SJ-NosratPosted over 3 years ago
Hi, Well done on the solution! I went through your CSS code; I don't see anything wrong, you're using all the correct approach. What I learnt recently with my latest project (which will be uploaded soon), if you feel that you're using repeated CSS code, like for ex: if various tags, like <h1>, <h2> are using the same font-weight, then group them together and add the font-weight once, as follows:
h1, h2 { font-weight: 700; }
Another thing to look at is to use units like rem or percentages for your font sizes, border-radius, width etc to allow for more fluidity for more responsiveness.
Also add the following:
* { box-sizing: border-box; padding: 0; margin: 0; }
The above code allows you to remove the default browser styles; this allows for you to start from a clean slate to add custom styling.
Lastly, the following article is very interesting on how the html tag and body tag interact: FreeCodeCamp Article by David Gray
Keep on coding! Best of luck with your coding journey!
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