html - why is there space between controls if margin and padding are set to 0? -
i have div containing 2 input elements of type text , label between them. user define interval (like 4 - 5). display on same line. 3 controls have margin , padding set 0. firebug confirms that. still there space between them. how come ? space come ?
it whitespace (newlines / spaces) between elements.
see these examples understand
<input type="text" /><label>-</label><input type="text" />
and
<input type="text" /> <label>-</label> <input type="text" />
or
<input type="text" /> <label>-</label> <input type="text" />
will render differently.
Comments
Post a Comment