請查看代碼其工作正常,直到縮放頁面...縮放頁面後頁面變得與其水平菜單集中在一起請seee代碼這將是偉大的,如果任何人都可以告訴什麼是什麼「不要做「,而不是隻爲這提供正確的CSS部分我在這個新的和想了解rathern方面比從各種來源 這裏複製的是CSS部分..對齊問題,同時縮放頁面
body{ background-color:#603}
div#hor ul{ position:relative; left:16%; }
div#hor li,div#ver li{ float:left;list-style-type:none; background-color:#603; border-radius:22px; margin:5px; }
div#hor a,div#ver a{text-decoration:none;
padding-left:32px; padding-right:32px;
font-family:"Comic Sans MS", cursive;
line-height::100px;padding-right: 32px;
padding-left: 32px;
display: block;
line-height: 40px;
color:#fff;
}
div#hor a:hover{background-color:#fff;color: #603;border-radius:22px;
}
div#hor a:focus{background-color:#fff;color:#603;border-radius:22px; font-weight:bold;
}
div#ver{ position:relative; top:100px;}
div#ver ul{ position:relative; left:-50%; float:left; }
div#ver li{ float:none; margin-bottom:20px;}
div#ver a:hover,div#ver a:focus{border-radius:22px;background-color:#fff;color: #603}
div#ver a:focus{ font-weight:bold; }
# here is the html part ...#
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="mystyle.css" />
</head>
<body>
<div id="hor">
<ul>
<li ><a href="#">Home</a></li>
<li><a href="#">Products</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
<div id="ver">
<ul>
<li ><a href="#">Java</a></li>
<li><a href="#">Php</a></li>
<li><a href="#">Asp.net</a></li>
<li><a href="#">Android</a></li>
<li><a href="#">Iphone</a></li>
</ul>
</div>
</body>
</html>
謝謝你們的幫助.. :) –