ELEMENT IN - inline block element
Inline block elements ( inline-Block ) is also have the characteristics of inline elements, the block elements, the code display:inline-block
is set to the inline element block element. (New CSS2.1), <img>, <input > tag is a tag that inline block.
inline-block elements Features:
1, and other elements on one line;
2, height, width, line height, and a top margin and a bottom element can be set.
Example: a default time is inline elements , inline element is not set wide and high of.
<! DOCTYPE the HTML > < HTML > < head > < Meta HTTP-equiv = "the Type-the Content" Content ; = "text / GB2312 HTML charset =" /> < title > with the block element </ title > < style type = "text / CSS" > A { the display : inline-Block ; width : 20px ; / * default width does not work * / height : 20px ;/ * Height does not work by default * / background : Pink ; / * set the background color to pink * / text-align = left : Center ; / * set the text centered * / } </ style > </ head > < body > < A > . 1 </ A > < A > 2 </ A > < A > . 3 </ A > < A > . 4 </ A > </ body > </html>