The Problem:
**The left part** (#nav ul li) which float: left and **the right part** (#nav .search) which float: right **are n
Have you tried adding the search as another list item within your nav and floating that to the right?
See the example below:
http://jsfiddle.net/teWP5/