简体   繁体   English

如何使菜单在顶部具有左对齐和右对齐的链接

[英]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 CSS

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

Your css should have somthing like 你的CSS应该有这样的东西

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

A demo here 这里演示

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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