Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multi column form

Status
Not open for further replies.

kpetursson

Programmer
Jan 28, 2002
313
US
is there an easy way to create a multi column form without resorting to tables?

ie.

+------------------------------------------------+
| label boxxxxxxxx label boxxxxxx |
| labbbbbel boxxxxxxxxxxxxxxxxxxxxxxxxxx |
| labbbbbel boxxx labbbbel boxxx label box |
+------------------------------------------------+

Any suggestions are most welcome.

Kevin Petursson
 
Yeah, you can float divs (and nest them to your satisfaction). Make sense?

To way how really depends on what your labels are, what your (input?) boxes) are, the desired widths and heights, how you want them to float according to eachother.

Nonetheless - the CSS property for this is float. And when working with floats - if you want to elements next to eachother (ie. in the same "line") you need to specify a float property to both ...

IMHO : Noone said that tables are banned all together. It's a matter of preference and purpose. Sometimes I use floats; some times I use tables - it all depends on the desired outcome.

 
it all depends on the desired outcome

Although really, it should depend on what you plan to display. Using tables to display tabular data is considered semantically correct. Using them because to achieve "a desired outcome" when this isn't the case sounds like a cop-out to me!

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Dan,

Talking about div vs table layouts : Sounds like you're the right person I should ask this. This has been bugging me for a looong time. Hope you can help.

A div : 700px wide and 400px high. Overflow will scroll. Now, I would like to center the div in the window, both horiz & vert...

The div could be wrapped around kpetursson's example.

How would I do that? With tables it's easy, but I just can't crack it with divs ... [morning]

Thanks man ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top