KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
The div is the quintessential block level element, and the span is the inline counterpart. They are the simplest possible form of that display type, with no other properties. In a great many cases I will give either of them the style: display: inline-block; This makes them behave in a very handy way. For div it means boxes that will easily sit next to each-other, while maintaining their width and height as defined. For the span I can use this to make colorful rectangles. The inline-block display is great for so many things, but I have never seen an element that starts as an inline-block without anything else going on. Images ( img ) are, but they are obviously not suited for the same things as a div , they have that style, but they fulfill a different purpose. So is there an element that I don't know of that is the quintessential inline-block , or is this left out? And if not, why? The uses of inline-block are numerous, so it seems like there should be some element that takes that basic form.
Tags (comma-separated)
Save Edits
Cancel