Interactive rating component [HTML, CSS]
Design comparison
Solution retrospective
margin: 0; padding: 0; box-sizing: border-box;
where is the best place to put this css styles to initialize the page, the "*:root" or the "body"?
Community feedback
- Account deleted
I apply it to everything at the top of CSS:
*, *::before, *::after { padding: 0; margin: 0; box-sizing: border-box; }
2@FernandoAguilar1Posted over 2 years ago@zauri-khutsishvili wow thanks I don't even know *::before and *::after exists
0Account deleted@FernandoAguilar1 ::before and ::after are pseudo-elements. They don't exist by default. You can learn about them here.
0 - @toonchavez8Posted over 2 years ago
Hey there I'm always glad to see people submit solutions as I know understand how difficult it can be to get them done sometimes so congratulations for that!
Firstly to answer your question I've always found it easier to to place it in your
:root{}
Incase you have to modify yourbody{}
I can suggest giving this a read to get a better understanding on some ways to reset your css1@FernandoAguilar1Posted over 2 years ago@toonchavez8 Thanks, I didn't know this was such a complicated subject.
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