我的html布局中的1 px偏移量(table,div)

时间:2014-05-26 20:22:30

标签: html css html-table

我正在创建一个网站,我偶然发现了一个令我痛苦的问题。

我从页面布局开始,但是我得到1px的偏移,我无法解决,我需要帮助。这就是我现在所拥有的。

body { 
    margin: 0;
    background-image: url('darkmetalgrid.jpg');
}
#PageContainer {
    position: absolute;
    width: 100%;
    top: 0px;
    bottom: 0px;
    overflow: auto;
}
#Page {
    margin: 0 auto;
    width: 1000px;
    height: 100%;
    border-collapse: collapse;
    background-color: white;
}
#Header {
    width: 1000px;
    height: 180px;
    background-color: red;
}
#Navigation {
    width: 1000px;
    height: 30px;
    background-color: blue;
}
#Body {
    bottom: 30px;
    width: 1000px;
    height: 100%;
    background-color: orange;
}

这是html

<body>
    <div id="PageContainer">
        <table id="Page">
            <tr><td id="Header"></td></tr>
            <tr><td id="Navigation"></td></tr>
            <tr>
                <td id="Body">

                </td>
            </tr>
        </table>
    </div>
</body>

导航单元在所有浏览器中都保持向右偏移1px。 ** I tried the same with DIV's using "display : table" and without the table but I had exactly same result.**

有人可以向我解释我在这里做错了吗?

请参阅网站http://www.quyodev.be/

0 个答案:

没有答案