If you have two floating divs, you know the fields. The problem is that the float:right div should be placed in front of the middle div. So basically you will have:
left-floated | rightful | in the center
Now about borders: usually you can just use margin:0 auto , right? The problem is that right now you know the values of the fields: floating divs! So you just need to use:
margin:0 right-floated-width 0 left-floated-width
That should work.
Through the years of editing
Meanwhile, a new toy appeared in the city: flexbox. Support is pretty good (i.e. if you don't need support below IE 10), and ease of use is above a floating point.
Here you can see a very good flexbox guide here . The example you need is here .
Ionuț Staicu Jul 03 '10 at 20:17 2010-07-03 20:17
source share