如圖定義一個(gè)無序列表按道理li元素里面的a標(biāo)簽中的首頁兩個(gè)字應(yīng)該和后面四個(gè)一樣騙到左邊可是為什么只有他偏中間呢,這是為什么哪位大神幫我指出這個(gè)錯(cuò)誤這錯(cuò)誤是在是難以解決,無論如何它都不應(yīng)該偏向右邊啊一下為代碼
<!DOCTYPE?html>
<html>
<head>
<meta?charset="UTF-8">
<title>Document</title>
<link?rel="stylesheet"?type="text/css"?href="1.css">
<link?rel="stylesheet"?type="text/css"?href="common.css">
</head>
<body>
<!--?頭部?-->
<div?class="top">
<div?class="topcontent">
<div?class="topl?fl">您好,歡迎來到建材網(wǎng)!</div>
<div?class="topr?fr">
<ul>
<li><a?href="#">建材網(wǎng)首頁</a></li>
<li><a?href="#">我的商務(wù)室</a><s></s></li>
<li><a?href="#">我的收藏</a><s></s></li>
<li><a?href="#">建材服務(wù)</a><s></s></li>
<li><a?href="#">客服中心</a></li>
<li><a?href="#">網(wǎng)站導(dǎo)航</a><s></s></li>
</ul>
</div>
</div>
</div>
<!--?logo和搜索框?-->
<div?class="logo">
<div?class="logol?fl">梅蘭</div>
<div?class="logor?fr">
<input?type="text"?placeholder="請輸入關(guān)鍵字"?class="logosearch">
<input?type="button"?value="搜索"?class="logobtn">
</div>
</div>
<!--?導(dǎo)航?-->
<div?class="nav">
<ul>
<li><a?href="#">首頁</a></li>
<li><a?href="#">建筑材料</a></li>
<li><a?href="#">兒童安全座椅</a></li>
<li><a?href="#">工藝美術(shù)品</a></li>
</ul>
</div>
</body>
</html>這是css樣式@charset="UTF-8";.top{ background: #F7F7F7; height: 30px; border-bottom: #D8D8D8 1px solid;}.topcontent{ width: 970px; height: 30px; margin: 0 auto;}.topl{ line-height: 30px; margin-left: 10px;}.topr li{ float: left; line-height: 30px; padding-right: 10px;}.topr ul li s{ display: inline-block; width: 10px; height: 12px; background: url(../meilan/sprite.fw.png) ; }.logo{ background: blue; width: 970px; height: 100px; margin: 0 auto;}.logol{ width: 200px; height: 84px; background: url(../meilan/sprite.fw.png) -20px 0; margin: 8px 0 14px 9px; text-indent: -1000em;}.logor{}/*.logosearch{ }.logobtn{ }*/.nav{ background: green; width: 970px; height: 270px; margin: 0 auto;}.nav li{ /*float: left;*/ /*margin-left: 14px; margin-right: 17px;*/ line-height: 27px; font: 16px 宋體 bold;}
添加回答
舉報(bào)
0/150
提交
取消