您有3个SPAN,必须是内联的,并且具有最小宽度.显然在IE上,SPAN不能具有最小宽度.我尝试使用DIV,但是当我把它放在一起的时候,最小宽度是忽略的.
CSS
span { display: inline; min-width: 150px; }
HTML
<span>1</span> <span>2</span> <span>3</span>
解决方法
内联元素不能采取宽度,高度,垂直边距&填充.所以你必须定义display:inline-block;写这样:
span { display: inline-block; *display: inline;/* for IE7*/ *zoom:1;/* for IE7*/ min-width: 150px; }
The ‘width’ property does not apply. A computed value of ‘auto’ for ‘margin-left’ or ‘margin-right’ becomes a used value of ‘0’.