3 ms·
"Amazing! What used to require an entire suite of floats, media queries, and outright hacks, is acheived by adding one property to a container div!" ...or you
by davedx 12y ago
"Amazing! What used to require an entire suite of floats, media queries, and outright hacks, is acheived by adding one property to a container div!"
...or you can just set display: inline-block on the child elements... [1]
[1] http://jsfiddle.net/18fjgc0w/ http://jsfiddle.net/18fjgc0w/
- treerock 12y agoTried inline block a few times but find the spacing on inline elements (and the various workarounds[1]) a bit awkward and unpredictable. [1] https://css-tricks.com/fighting-the-space-between-inline-block-elements/ https://css-tricks.com/fighting-the-space-between-inline-blo...
- masklinn 12y ago> ...or you can just set display: inline-block on the child elements... [1] Which requires various hacks or source-munging to remove word-spacing between your elements, and fix baseline spacing.