css问题,当从div转换到表 [英] css issue when convert from div to table

查看:131
本文介绍了css问题,当从div转换到表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的索引转换为html / css我的css工作正常时,它的div,但我不得不转换为表,并被卡住,ive使用表由于一些jquery和一些其他的东西,我的CSS很好与div和混乱这是我的css

ive my index convert to html/css my css was working fine when it div but i had to convert to table and am stuck , ive to use table due some jquery and some other things , my css is fine with div and messed up with table need a clue , here is my css

这里是演示索引与div的工作精细和演示与表弄乱了

Here is demo index with div which working fine and demo with table which messed up

:表 http://sudanesetweeps.com/dev/index.php
:div http://sudanesetweeps.com/dev/index2.php

/*


*/


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

.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;
}
    .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 .col2,
    .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 .col5{
        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:14px;
        text-align:center;
    }
        .footer_content a {
            color: #fff;
            font-size: 13px;
            font-weight:bold;
            text-decoration:none;
        }


推荐答案

元素通过firefox中的firebug或chrome的检查器

you may want to inspect the elements via firebug in firefox, or chrome's inspector

乍一看,排名标题,样式来自此层次结构:
.middle .row .col1 ,.middle .row_top .col1

at first glance on "Ranking" header, the style comes from this hierarchy : .middle .row .col1, .middle .row_top .col1

基于表格的标记没有任何类,您必须将它们放回原处

the table based markup does not have any classes, you'll have to place them back

这篇关于css问题,当从div转换到表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆