天天看点

初学者,简单的html内容分块布局,有一个问题求解答!!!

html代码:

初学者,简单的html内容分块布局,有一个问题求解答!!!

CSS代码:

#header {

background-color:black;

color:white;

text-align:center;

padding:5px;

}

#nav {

line-height:30px;

background-color:#eeeeee;

height:300px;

width:100px;

float:left;

padding:5px;

}

#section {

width:350px;

float:left;

padding:10px;

}

#footer {

background-color:black;

color:white;

clear:both;

text-align:center;

padding:5px;

}

不知道为什么针对header设计的样式显示不出来(在google浏览器中测试),背景颜色没有变黑,文本也没有居中,代码如上,望各路大神帮忙解答小白的问题!!!