I basically have a question in relation to this thread -> Extend last li to remaining width of a ul? I wasn't sure if I should reply or make a new thread and reference it.
Anyway, I have a navigation menu using ul and li like below. My first goal was the last li uses 100% of the remaining ul space, which I managed to do.
Original
-------------------------------------------------------------------------------
| | | |
| Item 1 | Item 2 | Search Box |
| | | |
-------------------------------------------------------------------------------
Using the above link, I managed to make look like this. So far so good.
-------------------------------------------------------------------------------
| | | |
| Item 1 | Item 2 | Search Box |
| | | |
-------------------------------------------------------------------------------
However now my problem is, the content of the last li is left align but I want it to be right aligned. The last li contains a form input. I tried using text-align:right, but that doesn;t seem to have an affect. I can't set the last li to float:right, because it's already set to float:none to make it width 100%, which I require.
In simple terms, how to I make the last li be 100% width of the remaining space and have the content be aligned right.
-------------------------------------------------------------------------------
| | | |
| Item 1 | Item 2 | Search Box |
| | | |
-------------------------------------------------------------------------------
Here is the fiddle: http://jsfiddle.net/K7w9j/