我照教程写的这个HTML为什么显示不正常呀?这是代<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>我的第一个网页</title>
<link href="Untitled-1.css" rel="stylesheet" type="text/css">
<style type="text/css">
header{height:150px;width:1200px;background:#abcdef}
nav{height:30px;background:#ff9900;margin-top:100px}
nav ul li{width:100px;height:30px;float:left;line-height:30px}
div{margin-top:10px;height:1500px;width:1200px;}
section{height:1500px;width:850px;background:#abcdef;float:left}
article{background:#DEB887;width:850px;margin:0 auto;text-align:center}
aside{height:1500px;width:340px;background:#abcdef;float:right}
footer{height:100px;background:#abcdef;width:1200px;clear:both;margin-top:10px}
body {
margin-left: 350px;
margin-top: 0px;
}
</style>
</head>
<body>
<header>
<nav>
<ul>
<li>首页</li>
<li>论坛</li>
<li>购物</li>
<li>新闻</li>
<li>视频</li>
<li>音乐</li>
<li>图片</li>
<li>软件</li>
<li>游戏</li>
</ul>
</nav>
</header>
<div>
<section>
<article>
<h2>春晓</h2>
<p>
春眠不觉晓,<br />
处处蚊子咬。<br />
打上敌敌畏,<br />
不知死多少。<br />
</p>
</article>
<hr />
<article>
<h2>上学歌</h2>
<p>
太阳当空照,<br />
花儿对我笑,<br />
小鸟早早早,你为什么背上小书包?<br />
我要炸学校老师不知道,一拉线,赶快跑,<br />
轰的一声,学校没了。<br />
</p>
</article>
<hr />
</
是导航栏里那条黄色区不和导航的字排在一行的,它象有两行似的(那黄色在文字上边了),怎样才能让文字在那黄色中间呢?还有那页面头部为什么不置顶呀,往下了大概150Px吧,body {
margin-left: 350px;
margin-top: 0px;
}
这样对页面进行居中行吗?正确要怎样写css 3来对网页进行居中的呀?因手机用夜猫流量,只能回复迟点,理解,等
align = "center" background-image:" " background-color = " "
追问我知道了,是这样的body{margin:0px auto;width:1200px;}
本回答被提问者采纳