Html 重置样式表,仍有空白

Html 重置样式表,仍有空白,html,css,Html,Css,我已经重置了样式表,但顶部仍然有一个白色条。我已经检查了我的代码,以确保我已将边距和填充设置为0,或已重置 JSFiddle()显示代码没有任何错误,但是当上传到主机时。。。 我已经试着解决这个问题5个小时了,我觉得自己很愚蠢 html 这是因为线的高度属性 #wrapper { margin: 0px auto; line-height: 0; /* <-- */ } #包装器{ 保证金:0px自动; 行高:0;/*非常感谢!没有想到包装器的行高:0。 body {

我已经重置了样式表,但顶部仍然有一个白色条。我已经检查了我的代码,以确保我已将边距和填充设置为0,或已重置

JSFiddle()显示代码没有任何错误,但是当上传到主机时。。。

我已经试着解决这个问题5个小时了,我觉得自己很愚蠢

html


这是因为线的高度属性

#wrapper {
    margin: 0px auto;
    line-height: 0; /* <-- */
}
#包装器{
保证金:0px自动;

行高:0;/*非常感谢!没有想到包装器的行高:0。
body
{
line-height: 1;
margin: 0px;
background: #f3f3f3;
}

ul
{
list-style: none;
list-style-image: none;
}

/* Clear Fix */
/* For modern browsers */
.cf:after {
    content: " "; /* 1 */
    display: table; /* 2 */
    clear: both;
}

/* WEBSITE INFO STARTS HERE */
#wrapper
{
margin: 0px auto;
}

/* SIDEBAR */
#sidebar-wrapper
{
float: left;
position: fixed;
background: gray;
}

.placeholder-sidebarimage
{
display: block;
width: 150px;
height: 150px;
margin: 0;
background: #3796bc;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-width: medium;
border-color: #d1d3d4;
}

/* CONTENT */
#content-wrapper
{
width: 1024px;
margin: 0 auto;
}

/* FOOTER */
#footer
{
position: relative;
}
#wrapper {
    margin: 0px auto;
    line-height: 0; /* <-- */
}
body {
     line-height: 1; /* <-- remove this */
     margin: 0px;
     background: #f3f3f3;
}