菜鸟级新手求高手解决P标签问题
最近自学做网站,刚好学校有门课是让自己选择两种编程语言,学会后做出一样东西来,我选了HTML和CSS,打算做静态网站,编码如下:<html>
<head>
<title>Finlandinfo</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<style>
table.cla1{
width:1000;
text-align:center;
font-size:15px;
}
td{
width:800;
height:30px;
cellspacing: 80px;
background-color:#A0A0A0 ;
text-align:center;
}
p.cla1{
align:center;
width:1000;
}
</style>
</head>
<body>
<table class="cla1" align="center">
<tr>
<td><a href="home.html">Home</a></td>
<td><a href="permits.html">Permits</a></td>
<td><a href="accommondation.html">Accommondation</a></td>
<td><a href="work.html">Work</a></td>
<td><a href="education.html">Education</a></td>
<td><a href="health.html">Health</a></td>
<td><a href="social.html">Social Services</a></td>
</tr>
</table>
<p class="cla1" align="center">
You have accessed these pages because you are contemplating immigration to Finland or because you are already resident in Finland.
</p>
</body>
</html>
导航长度已固定,接下来就是段落P标签的东西, 打算让P标签的每行文字长度与导航长度相同并居中,但是在style里面,P.cla1里我输入align:center之后,想让其长度定为跟导航长度一样:width:1000;但是这个时候P标签之内的align:center就不居中了,并且背景颜色长度超过导航长度,尽管已经设定了长度是1000,截图如下