本文介绍了将项目移到最右端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我曾经用来设计导航菜单栏的这段代码,
如何仅将注销的li项移至最右端,应该将其与其他项分开
this code i have used to design my navigation menu strip,
How do i move only logout li item to extreme right,it should be seperated from others
<div id="menu">
<ul>
<li><a class="current" href="../home.aspx" accesskey="1" title=""><span>Home</span></a></li>
<li><a href="../Entry.aspx" accesskey="2" title=""><span>Entry</span></a></li>
<li><a href="../Help.aspx" accesskey="3" title=""><span>Help</span></a></li>
<li><a href="../contact.aspx" accesskey="4" title=""><span>contact</span></a></li>
<li><a href="../About.aspx" accesskey="5" title=""><span>About</span></a></li>
<li><a href="?id=4" accesskey="6" title=""><span>LogOut</span></a></li>
</ul>
</div>
我该怎么办?
在此先感谢,
how do i do that?
thanks in advance,
推荐答案
<html>
<head>
<style type="text/css"><!--
li.right { text-align: right; }
--></style>
</head>
<body>
<ul>
<li>1</li>
<li>2</li>
<li class="right">3</li>
</ul>
</body>
</html>
<div id="menu" style="width: 300px">
<ul>
<li><a class="current" href="../home.aspx" accesskey="1" title=""><span>Home</span></a></li>
<li><a href="../Entry.aspx" accesskey="2" title=""><span>Entry</span></a></li>
<li><a href="../Help.aspx" accesskey="3" title=""><span>Help</span></a></li>
<li><a href="../contact.aspx" accesskey="4" title=""><span>contact</span></a></li>
<li><a href="../About.aspx" accesskey="5" title=""><span>About</span></a></li>
<li style="text-align: right"><a href="?id=4" accesskey="6" title=""><span>LogOut</span></a></li>
</ul>
</div>
希望对您有所帮助.
Hope it helps.
这篇关于将项目移到最右端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!