有 3 个 float div,我已将其设置为响应式操作。它在 Dreamweaver 的实时 View 中运行良好,但在浏览器中测试时却不行。这是一把 fiddle http://jsfiddle.net/pa5Ey/
CSS
#maincontentInner{
max-width:1170px;
position:relative;
margin:0 auto;
background-color:#FFF;
overflow:hidden;
border-right-width: 1px;
border-left-width: 1px;
border-right-style: solid;
border-left-style: solid;
border-right-color: #999999;
border-left-color: #999999;
padding-top:50px;
}
.3col {
width: 32.26%;
margin-right:1.6%;
float:left;
text-align:center;
}
和标记
<div class="3col" style="margin-left:1.9%">
Some Text Here<br />
Some Text Here<br />
Some Text Here<br />
Some Text Here<br />
</div>
<div class="3col">
Some Text Here<br />
Some Text Here<br />
Some Text Here<br />
Some Text Here<br />
</div>
<div class="3col">
Some Text Here<br />
Some Text Here<br />
Some Text Here<br />
Some Text Here<br />
</div>
<div class="clearfix"/>
</div><!-- End maincontentInner -->
最佳答案
CSS 不允许类名以数字开头。第一个字符必须是字母。
.threecol {
width: 32%;
margin-right:1%;
float:left;
text-align:center;
}
关于css - Div 在浏览器中没有响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21944965/