所以即時通訊設計一個網站在CSS中,即時通訊嘗試將我的導航欄(帶有鏈接的標題)居中,但是當我使用「文本對齊:中心」和「邊距:自動」屬性時,它不起作用。這是我的HTML文件代碼:如何將標題鏈接置於CSS中?
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html;charset=ISO-8859-1">
<title>Brickwood Fire Dept. - Established 2008</title>
<link type="text/css"
rel="stylesheet" href="main_style.css" media="screen"
</head>
<body>
<h1>
Brickwood Fire Department
</h1>
<h2>
Established 2008
</h2>
<h3>
<a class = "home" href = "http://www.brickwoodfiredept.weebly.com">Home</a>
<a href = "http://www.brickwoodfiredept.weebly.com/contact-us">Contact</a>
<a href = "http://www.brickwoodfiredept.weebly.com/media.html">Media</a>
<a href = "http://www.brickwoodfiredept.weebly.com/links">Links</a>
<a href = "http://www.brickwoodfiredept.weebly.com/newsletter">Newsletter</a>
</h3>
</body>
</html>
這裏是我的CSS代碼:
a {
color : white ;
background : #32C1DA ;
width : 30% ;
text-align : center ;
font-family : Arial ;
font-size : 150% ;
margin : auto ;
word-spacing : normal
}
的CSS代碼的其餘部分被省略了以節省空間。
唯一的問題是我希望他們像這樣佈置:「主頁布拉布拉布拉布拉」。 –