Reputation: 63
how to align this div to appear on right most side of webpage:
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>
i want to include this navigation bar on my every web page but want this to appear on right side of page... any idea how to do it?
Upvotes: 0
Views: 6334
Reputation: 2008
Check the fiddle link here http://jsfiddle.net/VWtLT/2/. Done the following chagnes in your css.
ul#nav {/*margin: 0 0 0 200px;*/}
ul.drop { position: relative; z-index: 597; float: right; }
Upvotes: 3
Reputation: 5673
Wow your formatting is extremely messy, I'd recommend hitting return after each line. But based on your title I think the solution is by setting the float to right:
#id
{
float:right;
}
Upvotes: 0
Reputation: 4639
Just change float of div to right
as show below
ul.drop { position: relative; z-index: 597; float: right; }
Upvotes: 0
Reputation:
Just Update the class as I mention below
ul.drop { float: right; position: relative; z-index: 597; }
Upvotes: 3