On 8/14/12 5:53 AM, John wrote:
I am trying to learn how to arrange things horizontally, the way  tables
makes almost effortless, but in css instead. Here's a screengrab of what
I'm trying to do:  http://coffeeonmars.com/testing/checkout.png

Using a tutorial suggesting floats to get things horizontal, I can get
started but I find myself using div after div trying to get things
positioned just so, and soon end up with a big ball of tangled string.

Seems things naturally arrange themselves vertically in CSS...I guess
there's a trick in getting them horizontal. Can someone share some tips
how this is done?

Well, you can use CSS table display properties instead of the multiple table
tags that an HTML table requires.

Other CSS properties that line up horizontally are "display: inline;"
"display: inline-block;" and, as you noted, "float: left;" or "float: right;".

In addition, you can get a block to snuggle up to floats, taking up whatever
room is left at the side, by giving it a "new block-formatting context."
Thierry shows you how:

 <http://www.css-101.org/block-formatting-contexts/>

HTH.
--
Cordially,
David

______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to