Friday, February 17, 2012

Basically I am making a horizontal navbar, and I need all the items to be left aligned, except 1 item which needs to be on the right aligned. I need to know how I would make that one single Item right aligned, preferably using CSS and not javascript.|||HTML:

<ul >
<li >item</li>
<li class="right>item</li>
</ul >

CSS
Ul {height:20px; list-style:none: padding:0; margin:0; display:block;}
Ul li { display: inline-block; zoom:1; *display:inline; width:auto; float:left;}
Ul .right { float:right;}

That should be cross browser but there is a part of the CSS that will break CSS validation. You could include it within conditional comments for ie7 or below. Make sure your up height is enough. Replace item with your link 'a' tags.

火车采集器

No comments:

Post a Comment