包裹

内联元素

内联元素本身就是包裹的

块状元素

块状元素只能竖直包裹,不能水平包裹

内联-块状元素

默认情况下({width:auto;height:auto})是包裹的

表格

默认情况下({width:auto;height:auto})是包裹的
元素 包裹实现
浮动元素 {width:auto;height:auto}
静态内联元素 ===
静态内联-块状元素 {width:auto;height:auto}
静态块状元素

竖直包裹:{height:auto;}

表格元素 {width:auto;height:auto}
绝对定位

水平包裹:{width:auto;left:num;right:auto;}or {width:auto;right:num;left:auto;}

竖直包裹:{height:auto;top:num;bottom:auto;}or {height:auto;to:num;bottom:auto;}

浮动

浮动元素不设定宽高的时候,是包裹的

但在不同的浏览器下,宽高不一致。特别是在ie6浏览器下,一不小心浮动元素就超长换行了

所以呢,在ie6下,最好还是给一个固定的宽度。

绝对定位

测试
¥56.00