[Solved] have an unordered list floated right, list items are backward
Posted: Fri, 2007-05-04 01:41
Hi - I've done some more work on the site I posted in my last post here. Now I've ran into another small problem that I can't seem to shake. I've got a nav menu (tabs) which I've floated right but since I've floated it right the list items are backward. The "HOME" tab is one the right instead of the left where I would expect it to be. I know it's because of the float: right, I just don't know how to change it. My nav menu's are normally on the left hand side so I've never encountered this before.
Thanks
Deron Sizemore
http://www.randomjabber.com
http://www.nicestylesheet.com


Moderator
Posts: 5685
Joined: 2005-02-22
When you float something
Posted: Fri, 2007-05-04 02:29
When you float something right it goes as far right as it can. So the first one will go to the right hand edge. Then next one will abutt the left edge of that item - ie, source order will be right to left order, or to put it another way from left to right they will be in reverse order.
You can fix it by reversing the source order.
On Having Layout | The One True Layout | menus by listamatic
Guru
Posts: 2610
Joined: 2005-12-14
Location: Victoria British Columbia
deronsizemore wrote:I've got
Posted: Fri, 2007-05-04 02:40
Which is how the CSS standard says it should be. Just as with a left float the first item in the list will float as far to the left as it possible, so with a float right the first item in the list must float to the right as far as possible.
I am not now, nor was I ever, any kind of "dude".
Ed Seedhouse
Enthusiast
Posts: 91
Joined: 2007-01-18
Thank you for the responses.
Posted: Fri, 2007-05-04 02:43
Thank you for the responses. I figured there was some easy CSS style I could throw in there to make the first list item appear back on the left. No big deal though, I will just reverse the HTML.
Deron Sizemore
http://www.randomjabber.com
http://www.nicestylesheet.com
Guru
Posts: 2834
Joined: 2004-09-01
Location: MA, USA
You could try floating the
Posted: Fri, 2007-05-04 13:06
You could try floating the li left (or display: inline) and the float the ul right
Enthusiast
Posts: 91
Joined: 2007-01-18
wolfcry911 wrote:You could
Posted: Fri, 2007-05-04 13:33
I had tried originally floating the li left and the ul right (didn't work - it just places the nav back on the left hand side). I had not tried display: inline, but that also didn't work. I switched the HTML around around and it's fine.
I appreciate the help!
Deron Sizemore
http://www.randomjabber.com
http://www.nicestylesheet.com
Enthusiast
Posts: 91
Joined: 2007-01-18
Wolfcry. After some code
Posted: Fri, 2007-05-04 14:15
Wolfcry. After some code tweaking, floating the url right and then floating the li left actually did work.
Thanks.
Deron Sizemore
http://www.randomjabber.com
http://www.nicestylesheet.com