Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/90.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 以css为中心不';不在internet explorer中工作,但在chrome中工作_Html_Css_Google Chrome_Internet Explorer - Fatal编程技术网

Html 以css为中心不';不在internet explorer中工作,但在chrome中工作

Html 以css为中心不';不在internet explorer中工作,但在chrome中工作,html,css,google-chrome,internet-explorer,Html,Css,Google Chrome,Internet Explorer,我试着把一个div放在一个div的中间,这个div有左边的边距和右边的边距。但它只适用于chrome。我已经试过了!DOCTYPE html,但这不起作用 HTML 这就是IE中的外观:。 在chrome中也是这样:。希望你能学到一些东西 被否决后更新了1.0 HTML 结果呢 在IE8中测试 使用魔法球体哦。。哦,是的,我能看到。。。Uhu。。隐马尔可夫模型。。是的,那太烦人了如果您没有得到提示:如果没有任何代码,我们将无法帮助您。:)我改了。。对不起,我还没准备好,没关系,我看看now@Th

我试着把一个div放在一个div的中间,这个div有左边的边距和右边的边距。但它只适用于chrome。我已经试过了!DOCTYPE html,但这不起作用

HTML

这就是IE中的外观:。
在chrome中也是这样:。

希望你能学到一些东西

被否决后更新了1.0

HTML

结果呢

在IE8中测试


使用魔法球体哦。。哦,是的,我能看到。。。Uhu。。隐马尔可夫模型。。是的,那太烦人了如果您没有得到提示:如果没有任何代码,我们将无法帮助您。:)我改了。。对不起,我还没准备好,没关系,我看看now@ThijnLinders请仅在问题完成后提交问题。:)提前按“提交”按钮是没有用的:你不会更快地得到帮助,而且人们会很快否决不完整的问题。嗯,感觉很奇怪。。仍然没有完成。你能指定你想集中哪个分区吗?我没有否决你的意见,但是:在你的代码中提供一个JSFIDLE可能是个好主意,这样其他人可以立即检查它是否有效。“试着用这个”也可能意味着你不确定自己,这也可能导致选票下降。@Jordumus lol因为提问的人没有提供足够的信息。我也不知道这篇文章是从哪里来的。至少文本对齐:居中;应该是有效的,并将宽度设置为100%。社区在投票给你时并不关心这个问题,他们关心的是你的答案;)如果它不符合指导原则,它将被否决。:)
    <div id="footer-links">
        <div id="footer-wrapper">
            <table id="table-links">        
            </table>
        </div>              
</div>
    #footer-links {
    width: 100%;
    height: auto;
    font-family: calibri;}

    #footer-wrapper{
    width: 1024px;
    position: relative;
    margin-left: auto;
    margin-right: auto;
}
    <div id="footer">
        <p>Hello World</p>
    </div>
body {
    margin: 0;
    padding: 0;
    height: 100%;
}
html {
    height: 100%;
    margin: 0;
    padding: 0;
}

#footer {
    position: absolute;
    width: 100%;
    clear: both;
    bottom: 0;
    padding: 0;
    margin: 0;
    height: 30px; /* REMEMBER height = padding-bottom */
    background: #333;
}

#footer p{
    color: white;
    text-align: center;
    margin-top: 8px;
}