Is there a way to have two divs placed next to each other so that:
- The width of the outer div is unknown
- The rightmost div atapts its width to its content (shrink-to-fit)
- The leftmost div fills the remaining space
I see that Paul D. Waite has almost cut it here: xHTML/CSS: How to make inner div get 100% width minus another div width
In my case, the two inner divs need to switch places, and I just can't cut it.
Any ideas?
Simply change
float: left
tofloat: right
in Paul's example.HTML:
CSS:
Test jsFiddle
Here you go:
http://jsfiddle.net/BhAcn/1/
Paul Waite's example fitted to your question
Try this....
Html:
CSS
Hope this helps!!!