css - Is there any HTML element that exists as the quintessential inline-block? -


the div quintessential block level element, , span inline counterpart. simplest possible form of display type, no other properties. in great many cases give either of them style:

display: inline-block; 

this makes them behave in handy way. div means boxes sit next each-other, while maintaining width , height defined. span can use make colorful rectangles. inline-block display great many things, have never seen element starts inline-block without else going on.

images (img) are, not suited same things div, have style, fulfill different purpose.

so there element don't know of quintessential inline-block, or left out?

and if not, why? uses of inline-block numerous, seems there should element takes basic form.

there's no such element, , there reasons why not.

inline-block has several uses in contemporary web design. not part of original design, includes block , inline elements. instead derives <img> added nsca mosaic. (which uses the wrong markup , helped defeat original "responsive design". think we've started fix problems img).

further down timeline, inline-block still wasn't part of ie4 or 5, or version of netscape. wasn't part of html4 era. wouldn't expect find hypothetical element in version of standard. inline-block appears in css2, came after html4. (look @ reference section in each standard).

unlike block, inline-block is affected whitespace in markup. it's implied name, , it's you'd expect looking @ <img> in middle of text (aka wordprocessor object anchored "as character"). beyond origins there, whitespace-dependent markup becomes troublesome. wouldn't expect w3c html5 enshrine in new element.

specifying involve argument "semantics", separation of content , presentation etc. (as call :). , if default rendering makes whitespace significant - not part of semantics of element? consider using images represent words - or individual letters of word (with appropriate alt text). illustrates presence of whitespace (or not) around element semantically significant, presenceofwhitespaceseparatingwordsissemanticallysignificant. seems big problem me.

inline-block promoted modern alternative using float everywhere. neither genuinely suitable. why css3 standardize new layout modes: "flexbox" , "grid", support modern responsive designs genuine, clean markup. no dummy markup (or dummy generated content). no hacking around whitespace-dependence.


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -