Problem:
Interested to know if there are any real-world examples in HTML/CSS when you need to use display: block
on inline elements. For the reverse order, I found that display: inline
could be used on <li>
in a <nav>
to display links vertically. I am not interested to know the difference between inline, block, and inline-block.
Current examples:
Current examples include showing how to use the display: block
on <span>
elements, and so forth. But many of these examples only illustrate the effect of display: block
but not the actual use of it on a website.
Question:
For what reason and where on a website could it be relevant to use display: block
to change elements from inline-level to block-level?
` element around all content and move the button outside the `
` instead of using `display: block`?
– kexxcream May 18 '21 at 14:59