Stats preview card component using bootstrap
Design comparison
Solution retrospective
Hello everyone, please let me know if you have any comment about my code. I have tried to do this as responsive as i could. I have some questions:
- Is it okay to use so many divs in the code?
- Is it okay to put a div inside other div?
Community feedback
- @hcxwebPosted almost 3 years ago
Hello Rodrigo, to make this responsive on smaller screens I would suggest using flexbox for this challenge. Using flexbox allows you also to avoid using float (no longer recommended). To answer your questions, it may be okay to use many divs, but it's best practice to use meaningful tags, as div tag has no meaning. For example, in your code, you could use <main></main> for the container, and <footer></footer> for the footer. It's okay to put a div inside another one. Overall, limiting the use of div tag is preferred. You can learn more about the tags here https://www.w3schools.com/tags/tag_main.asp
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