2014-10-13 20:49, Артур Истомин wrote:
I don't understand, why there is a space between two <div>? There is no
margin, no padding (besides <body>'s 8px paddings). Why and how to get
rid of them?
http://jsfiddle.net/s8jyxsdr/2/
You have two <div> elements set to have display: inline-block. An inline
block is treated, loosely speaking, as a black box that acts like a
letter in line layout. So the two elements are laid basically as if you
had “A” and “B” on two lines, which is equivalent to “A B”. So there is
whitespace between them, and this causes a word space, with a width
equal to that of SPACE character in the current font (on the average,
about 0.25em).
To remove the space, remove the whitespace between the elements. In this
case, replace
<div id="a"></div>
<div id="b"></div>
by
<div id="a"></div><div id="b"></div>
Yucca
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/