浏览器兼容一节

时间:2014-01-01 07:00:19

标签: html css

<section class="wrapper">
    other html codes.

</section>

以下是我的css。

.wrapper {
    display: inline-block;
    margin-top: 60px;
    padding: 15px;
    width: 100%;
}

对于mozilla和chrome没有任何问题。但对于Internet Explorer,整个部分向右移动一点。帮助我解决问题。

2 个答案:

答案 0 :(得分:1)

您是否尝试过使用HTML5 shiv?虽然IE 10不需要这个。

<!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->

另一种可能性是不同的浏览器具有不同的默认边距/填充。尝试将它们归零:

*{margin:0;padding:0}

答案 1 :(得分:0)

尝试使用从此处http://meyerweb.com/eric/tools/css/reset/reset.css找到的reset.css ...将此css文件用作css中的第一个顶级文件..然后将其余部分用于css。让我们知道它是怎么回事

相关问题