Great solution! I like your approach to the CSS and the semantic HTML markup.
If I had to say something, I'd suggest having a complete CSS reset to avoid possible unexpected behaviors, but everything looks good nonetheless. Keep up the good work!
@NiloyDas07
Posted
@anaiswritingcode Can you please elaborate on what you meant by complete CSS reset?
@NiloyDas07 Of course! A CSS reset is a set of several rulesets that you can paste into your CSS documents to reduce browser inconsistencies and just make everything more uniform across browsers overall. It overrides the default format of a few elements, which can help with unexpected behaviors down the line.
You already had a part of it in your code:
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
However, there are longer CSS resets, which was what I meant by "complete" reset. This one is a good example, although it's also a bit short like the author mentions in the article.
If you check the code of my solution for this same Frontend Mentor challenge, you'll be able to see the CSS reset I applied just at the start of the CSS file.
Marked as helpful
@NiloyDas07
Posted
@anaiswritingcode Thanks a lot! The article you linked was very interesting. And I checked your solution. It's great. I am excited to apply these concepts in my future projects. :-)
@NiloyDas07 Glad I could help! Happy coding :)