如何使這個div出現在網頁的最右側:如何對齊這個div出現在網頁的最右側?
CSS
/*---- CROSS BROWSER DROPDOWN MENU ----*/
ul#nav {
margin: 0 0 0 200px;
}
ul.drop a {
display:block;
color: #fff;
font-family: Verdana;
font-size: 14px;
text-decoration: none;
}
ul.drop, ul.drop li, ul.drop ul {
list-style: none;
margin: 0;
padding: 0;
border: 1px solid #fff;
background: #555;
color: #fff;
}
ul.drop {
position: relative;
z-index: 597;
float: left;
}
ul.drop li {
float: left;
line-height: 1.3em;
vertical-align: middle;
zoom: 1;
padding: 5px 10px;
}
ul.drop li.hover, ul.drop li:hover {
position: relative;
z-index: 599;
cursor: default;
background: #1e7c9a;
}
ul.drop ul {
visibility: hidden;
position: absolute;
top: 100%;
left: 0;
z-index: 598;
width: 195px;
background: #555;
border: 1px solid #fff;
}
ul.drop ul li {
float: none;
}
ul.drop ul ul {
top: -2px;
left: 100%;
}
ul.drop li:hover > ul {
visibility: visible
}
.style1 {
font-family: calibri;
font-size: 18px;
font-weight: bold;
}
HTML
<p> </p>
<ul class="drop" id="nav" name="nav">
<li><a href='calls.php' class="style1">View Trends</a>
</li>
<!-- <li><a href='calls1.php?id= $date;&id1= $d; ' class="style1">View Trends</a></li>-->
<li><span class="style1">Run Decision Support System</span>
<ul>
<li><span class="style1"><a href="calls.php">Churn Prediction</a></li></span>
<li><span class="style1"><a href="calls.php">Customers Segmentization</a></li></span>
</ul>
<li><a href="#" class="style1">Run Expert System</a>
</li>
我想包括我每到這個導航條網頁,但希望這出現在頁面的右側...任何想法如何做到這一點?
看看[此帖](http://stackoverflow.com/questions/4236151/how-to-make-a-div-always-float-on-the-screen-in-右上角) – Andri
你也應該看看你的html格式,你以某種方式打開標籤並用不同的順序關閉,
使用jsfiddle快速格式化代碼並檢測語法錯誤。它也可以幫助其他人快速弄清楚它的外觀如何http://jsfiddle.net/techunter/FUKpU/ – TecHunter