Chrome和IE的css问题

时间:2011-08-30 00:02:30

标签: css internet-explorer google-chrome

这是我的问题,顶级原始搞砸了Chrome和IE但在FF工作正常, 演示页面:http://sudanesetweeps.com/dev/index.php

这是我的css

/*

*/


body {
    background: #282425 url(../images/background.jpg) no-repeat top center;
    font-size:12px;
}

#myTable { width: 100%;overflow:hidden; }
.wrapper {
    position:relative;
    margin: 0 auto;
    width: 852px;
    padding: 25px 0;
}

/* header */
.header .logo {
    margin-bottom: 21px;
}
.header ul.nav {
    position:relative;
    list-style: none;
    margin:0;padding:0;
    color: #fcd770;
    background: url(../images/menu.png) no-repeat top left;
    overflow:hidden;
    height: 46px;
    font-size:15px;
}
    .header ul.nav li {
        float:left;
        position:relative;
        margin: 15px 0 0 20px;
    }
    .header ul.nav li a{
        color: #fcd770;
        text-decoration:none;
        font-weight:bold;
    }
.header .header_twitter {
    position:relative;
    height: 260px;
    background: url(../images/header_bg.png) no-repeat top left;
    color: #fff;
}
    .header .header_twitter .singin_twitter {
        position:absolute;
        bottom: 40px;
        right: 55px;
    }

/* middle */
.middle {
    position:relative;
    margin: 30px 0;
}
.middle a{
    color: #000;
}
    .middle .row_top {
        background: url(../images/table_top.png) no-repeat top left;
        overflow:hidden;
        color: #fcd770;
    }
    .middle .row {
        overflow:hidden;
        background: url(../images/table_middle.png) no-repeat top left;
        color: #000;
    }
    .middle .row_top .col1,
    .middle .row_top .col2,
    .middle .row_top .col3,
    .middle .row_top .col4,
    .middle .row_top .col5,
    .middle .row_top .col6,
    .middle .row_top .col7,
    .middle .row_top .col8{
        float:left;
        padding: 20px 0 18px;
        text-align:center;
    }
    .middle .row .col1,
    .middle .row .col5,
    .middle .row .col3,
    .middle .row .col4,
    .middle .row .col6,
    .middle .row .col7,
    .middle .row .col8{
        float:left;
        padding: 20px 0 0 0;
        text-align:center;
    }
    .middle .row .col2{
        padding: 7px 0 8px 0;
        float:left;
        text-align:center;
    }
    .middle .row .col1,
    .middle .row_top .col1{
        width: 98px;
    }
    .middle .row .col2,
    .middle .row_top .col2{
        width: 102px;
    }
    .middle .row .col3,
    .middle .row_top .col3{
        width: 146px;
    }
    .middle .row .col4,
    .middle .row_top .col4{
        width: 150px;
    }
    .middle .row .col5,
    .middle .row_top .col5{
        width:76px;
    }
    .middle .row .col6,
    .middle .row_top .col6{
        width:73px;
    }
    .middle .row .col7,
    .middle .row_top .col7{
        width:118px;
    }
    .middle .row .col8,
    .middle .row_top .col8{
        width:87px;
    }
    .middle .last {
        background: url(../images/table_bottom.png) no-repeat top left;
    }




/* footer */
.footer {

}
    .footer_top {
        height: 17px;
        background: url(../images/footer_top.png) no-repeat top left;
    }
    .footer_bottom {
        height: 17px;
        background: url(../images/footer_bottom.png) no-repeat top left;
    }
    .footer_content {
        background: #2b7fc3;
        color: #fff;
        width:851px;
        font-size:12px;
        text-align:center;
    }
        .footer_content a {
            color: #fcd770 ;
            font-size: 12px;

            text-decoration:none;
        }

这里是jquery table css demo_table_jui.css

我无法通过这里bcs它太长了所以这里是代码链接

http://paste.ideaslabs.com/show/c1qqXYpf9i

2 个答案:

答案 0 :(得分:1)

根据您的实际网站,现在将float:left添加到以下规则中应该会在Chrome中修复它,但在Firefox中看起来仍然可以。

.middle .row {
    overflow: hidden;
    background: url(../images/table_middle.png) no-repeat top left;
    color: black;
    float: left; /* add this */
}

我无法在IE中测试。因为目前你在doctype之前发布了下面的代码,它将IE引入怪癖模式,并迫使IE9看到你的 kill即消息

<script lang='javascript'> 
    <!--[if lte IE 6]>
        window.location = "ie6dead.php";
    <![endif]-->
</script>

你的doctype之前没有任何东西,甚至没有评论,或者IE会被抛入怪癖模式。您需要将此条件注释移动到<head>部分,以便IE正常运行。

答案 1 :(得分:0)

在发布之前,你认为你不能把它煮沸一点吗?

无论如何,在style.css中第80行删除float: left将是修复此问题的良好开端。