CSS表格宽度

时间:2015-02-17 07:45:39

标签: html css css-tables

my fiddle

.content {
    width: 1140px;
    margin: 0 auto;
    text-align: center;
}
.content .content_row {
    display: table;
}

我想证明我的两行是1140px。 我可以在没有table-tag的情况下这样做吗?

UPD。我想要这个result

3 个答案:

答案 0 :(得分:0)

尝试以下

.content {
    min-width: 1140px; // Change to min-width
    margin: 0 auto;
    text-align: center;
}
.content .content_row {
    display: table;
}

答案 1 :(得分:0)

请尝试以下操作: Demo

.content {    
    margin: 0 auto;
    text-align: center; // Removed width from .content
}
.content > .content_row {
    display: table;
    width: 1140px; // Added width here
}

答案 2 :(得分:0)

试试这个,

.content .content_row {        
    border-spacing:10px
}

See Demo