简体   繁体   中英

Separating list items to right and left in a single UL

I have a UL used as a menu, in this I have several list items and I want to separate them to the right and left of page, ie the menu items will be on right and log in links on the left, although I can't find the attribute used to do this thing, I tried aligning the LI to the left but with no success and tried defining them as separate class and floating him but again they don't move to the left.

Any help with the right css attributes?

thanks alot in advance,

anton.

<li>
<a href="@" class="logon">page4</a>
</li>

li.class{
float:right;
}

Try Changing your css code like

li > a {

     float:right;
}

伙计们非常感谢您的帮助,我终于要修复它了,问题是我在定义它们之前浮现了定义#menu的UL LI属性,一旦我删除了此声明,它就使用class移到了左边。

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