负面利润率在Chrome和Firefox上表现不同

时间:2014-03-12 11:40:46

标签: html css google-chrome firefox

我试图通过使用负边距顶部将两个嵌套的div对齐到一行,但Firefox(FF)和Chrome上的渲染完全不同。以下是http://jsfiddle.net/2SK5t/

上的简单示例

HTML

<div class='row_custom'>
    <div>Hello World</div>
</div>
<div class='row_custom'>
    <div class='row_2'>Hello World</div>
</div>

CSS

.row_custom{
    margin-right: 0px;
    margin-left: 0px;
    display: table;
    content: " ";
}
.row_2{
    color:blue;
    margin-top: -20px;
}

1 个答案:

答案 0 :(得分:0)

删除display: table;,然后匹配。

相关问题