width - Display: Inline block - What is that space? -
this question has answer here:
inline blocks have weird space in-between them. live it, point where, if load more content ajax call, tiny space goes away. know i'm missing here.
div { width: 100px; height: auto; border: 1px solid red; outline: 1px solid blue; margin: 0; padding: 0; display: inline-block; }
how make spacing consistent in inline blocks ?
the space in html. there several possible solutions. best worst:
- remove actual space in html (ideally server when file served, or @ least input template spaced appropriately) http://jsfiddle.net/awmmt/2/
- use
float: left
instead ofdisplay: inline-block
, has undesirable effects on t height: http://jsfiddle.net/awmmt/3/ - set container's
font-size
0 , set appropriatefont-size
internal elements: http://jsfiddle.net/awmmt/4/ -- pretty simple, can't take advantage of relative font size rules on internal elements (percentages, em)
Comments
Post a Comment