3 ms·
Being able to specify that an element is placed within a document flow (inline) is useful. Conversely being able to specify that a (block)-level element has it
by lwhi 16y ago
Being able to specify that an element is placed within a document flow (inline) is useful. Conversely being able to specify that a (block)-level element has its own position (relative or absolute) is also useful.
Sometimes it's useful for an element to be placed 'inline', but also share some of the properties that a block-level element has (like width and height) - so 'inline-block' has its place too.
I think part of the problem is, there are no every-day terms that can be used to illustrate a lot of the concepts that CSS makes use of.
If simple terms were chosen, the ability to do a lot of things would be crippled. Only simple things would be possible - and this wouldn't suit everyone.
But I do agree that it would nice if everything made more sense from the get go.
- danenania 16y agoI don't think those properties should be thrown out. As someone said they are useful for what they were meant to do: style documents. But they're very clumsy when it comes to laying out applications. CSS (and/or HTML) simply needs a friendlier and more direct interface for this purpose.
- lwhi 16y agoThat's why we have frameworks :)