Here are a few things going on.
<div> is a block level element. This means that by default you will get a new line after each of them. (CSS will be display: block ).
You can force them not to make newlines, but keeping their distance characteristic by doing:
display: inline-block
This will make them display inline, but allow a vertical distance, as if they were block level elements.
You were right to try float them, but due to the way the CSS Box Model works, any margin or border attribute will cause them to be larger than the percentages you specify. (Edit: skipped this float: center - this does not exist. This is right or left for float .)
You can try to specify a width that is less than 100% if you want to keep swimming.
tkone
source share