css - Div 在浏览器中没有响应

标签 css responsive-design percentage

有 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 不允许类名以数字开头。第一个字符必须是字母。

Updated jsfiddle

.threecol {
    width: 32%;
    margin-right:1%;
    float:left;
    text-align:center;
}

关于css - Div 在浏览器中没有响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21944965/

相关文章:

html - 在移动其他 DIV 的位置之前将 DIV 的大小调整为最小值

css - 如何让我的网站响应智能手机

javascript - jquery - 如何在悬停时更改 li 中按钮的显示 css 属性

javascript - 完整的 bootstrap markdown 高度

jquery - 修复在 Bootstrap 选项卡上无法正常工作的问题

html - 避免在响应式设计中使用 Meta Viewport 标签 - Google Insights Score

html - 不使用百分比 TOP 值的固定高度 DIV

html - 使用百分比而不是像素的 CSS 高度

CSS 边距表现奇怪

html - 位置绝对左边 :50% does not position span in the middle