I'm trying to do this on my header:
Link | Link | Link LoginStatus
But the Menu Control just won't float. What it does is like this:
Link | Link | Link
LoginStatus
I've tried floating it left but still doesn't work.
<div class="menucontainer">
<asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal" Style="float:left">
<Items>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Generate Report"
Value="Generate Report"/>
<asp:MenuItem Selectable="False" Text="|"></asp:MenuItem>
<asp:MenuItem NavigateUrl="~/Download.aspx" Text="Mass Export"
Value="Mass Export"></asp:MenuItem>
<asp:MenuItem Text="|"></asp:MenuItem>
<asp:MenuItem NavigateUrl="~/Admin/Home.aspx" Text="Login"
Value="Login"></asp:MenuItem>
</Items>
<StaticMenuItemStyle BackColor="White" BorderColor="#CCCCCC"
BorderWidth="1px" />
</asp:Menu>
<div style="float:left">asdaddas</div>
</div>
CSS
div.menucontainer
{
background-color:#465C71;
border-bottom: 4px solid #465c71;
margin: 0px 0px 0px 0px;
width:100%;
-moz-border-radius: 6px 6px 1px 1px; /*FF1+ */
-webkit-border-radius: 6px 6px 1px 1px; /* Saf3-4, iOS 1+, Android 1.5+ */
border-radius: 4px 4px 1px 1px;/* Opera 10.5, IE9, Saf5, Chrome, FF4 */
clear:both;
}
div.menu
{
padding: 4px 0px 0px 5px;
font-size: 12px;
float:left;
width:auto;
border-right: 20px solid red;
clear:none;
}
If you have the links working correctly with
float:left
, why not usefloat:right
on your LoginStatus button (it's in its owndiv
, from what I can tell).just wrap your Menu Tag in a div and float that div.