DEV Community

Discussion on: How do I write this HTML line better

Collapse
 
midblue profile image
Jasper Stephenson • Edited

If you want them to be simply on top of one another, just make them both <div>s instead of <span>s. By default, spans have the property "display: inline" which makes them fall side by side. Divs, on the other hand (since they default to "display: block") will fill the entire width of their container.