Design comparison
SolutionDesign
Solution retrospective
Any feedback desired :)
Community feedback
- @1Hibiki1Posted over 4 years ago
span is an inline element, and div is a block element, so it is a bad idea to nest a div inside a span. Block elements take up full width and starts on a new line, whereas inline elements continue on the same line and take up only as much width as necessary.
More information about inline and block elements:
https://www.w3schools.com/html/html_blocks.asp Also, looking at your code, you seem to have used the span as a "wrapper". It is always a better idea to use a div in such cases. Good luck!2
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