简体   繁体   中英

how to have a menu across top with links left aligned and right aligned

this may seem simple. I have a menu across the top of the page currently right aligned. I want one link to be to the left of the page. How do it?

 <div id="toptop"> 
     <ul id="bottomnavlistl">
    <li class="a">
             <a href="@Url.Content("~/Account/EditDetails/")">LOGIN</a>
             <a href="@Url.Content("~/Account/LogOff/")">LOGOUT</a>
    </li>
    <li class="first"><a href="@Url.Content("~")">HOME</a></li>

css

    ul#bottomnavlistl li
{    
    display: inline;
    padding: 10px 0px 5px 0px;
    border-right: 1px dotted #8A8575; 
    float:right;   
}

Your css should have somthing like

.a{float:left;}
.first{float:right}

A demo here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM