PDA

View Full Version : Float: Left; breaks margin-left/right: auto?



Recursion
29-03-2010, 03:52 PM
Hey,

So I had my DIVs centered using margin-left: auto; and margin-right: auto; but then I needed to get them to sit next to each other, so I used float:left; but thanks to the way the float element works, It breaks the centering.

So, how do you center DIVs that need to be next to each other?!

Thanks

Recursion
29-03-2010, 04:32 PM
Can't edit, thanks Chris! Forgot to set the width on the container DIV :/

Want to hide these adverts? Register an account for free!