Remembering that floats take the element out of the natural flow, you will need one of three methods to prevent items following it from flowing up around the last floated elements: 1) overflow:hidden on the parent as above 2) also float the parent container which causes the parent to "shrink wrap" around it's floated children 3) add a clearing element immediately after the parent (or the last element INSIDE the parent.)
<div style="clear:both"></div>
Another caveat about floats: you should ALWAYS assign a width to floated elements.
Another way is absolute positioning. I'd previously avoided absolute positioning because it can be problematic as a framework for layout, but thanks to swa66, I have a whole new outlook on absolute positioning. Not all elements need to be absolutely positioned; you need to only apply the position property to the parent to contain absolutely positioned children.
#parent { width: 95%; margin: 0 auto; position:relative; } #parent p { width: 48%; position:absolute; } #parent p:last-child { left: 50%; } /* first child defaults to 0,0, last-child top defaults to 0 */
The visual effect of these are identical, which one you use depends on the context of the page itself. I'm sure there are other ways.
Leosghost
12:51 am on Jun 16, 2012 (gmt 0)
So ..now tell him how to create them..the question was "how" not "what"..( be carefull not to trip the "bad words" filter here ) in doing so :)