Is it better to use cell spacing for table layout

R

Ryan

I am not a web programmer and trying to figure out the best way for laying
out a form for data entry. I would like, for example, to have a right
justified label followed by 5 pixals and a left justified textbox. Should I
use three columns for this, with the center column five pixals wide or two
colums with the table cell spacing set to five pixals.

Also, when is it appropriate to use the lable control as opposed to just
keying text into the cell? Or does it matter?
 
C

Chad Devine

I would do the 3 column approach, but when considering exact pixels,
you must remember that you have table border and cellpadding settings
that will calculate into this as well.

If you do cell spacing, I believe it will add 5 pixels on all sides of
the cell, not just between the horizontal borders of them.
 
B

bruce barker

i would use two columns, the more complex the table, the longer to render.
you should always use a label, and fill the for attribute. its used by the
browser for accessibility (opera is real good at this)

-- bruce (sqlwork.com)



| I am not a web programmer and trying to figure out the best way for laying
| out a form for data entry. I would like, for example, to have a right
| justified label followed by 5 pixals and a left justified textbox. Should
I
| use three columns for this, with the center column five pixals wide or two
| colums with the table cell spacing set to five pixals.
|
| Also, when is it appropriate to use the lable control as opposed to just
| keying text into the cell? Or does it matter?
|
|
 
C

Chad Devine

I think the load time of a 3 column table to make a form will be
negligible in this case. I agree if you're pulling many many rows of
information into a datagrid, having as few columns as possible is
important. This is a form to update a sql server, I don't think having
3 columns is going to hurt much. The only reason I say this, is because
I don't understand your suggestion:

"you should always use a label, and fill the for attribute."
What does that mean?
 
C

Chad Devine

I think the load time of a 3 column table to make a form will be
negligible in this case. I agree if you're pulling many many rows of
information into a datagrid, having as few columns as possible is
important. This is a form to update a sql server, I don't think having
3 columns is going to hurt much. The only reason I say this, is because
I don't understand your suggestion:

"you should always use a label, and fill the for attribute."
What does that mean?
 
R

Ryan

Actually, I used that only as an example. Some of the forms will be quite
complex and simplifying the table's seems preferable so long as there are no
artifacts or downside to it.
 
C

Chad Devine

Whichever the case use your best judgement, but consider the people you
are targeting this site at. If the average user is using a decent
computer, 100 rows with 6 columns will render instantaneously.
I know, because I am doinging it right now.
 
M

mark4asp

I am not a web programmer and trying to figure out the best way for laying
out a form for data entry. I would like, for example, to have a right
justified label followed by 5 pixals and a left justified textbox. Should I
use three columns for this, with the center column five pixals wide or two
colums with the table cell spacing set to five pixals.

Also, when is it appropriate to use the lable control as opposed to just
keying text into the cell? Or does it matter?

Surely you can just give the second column a attribute
<td style = "padding-left: 5px"> </td>

You can implement this by using a style sheet (HTML class
attribute rather than style attribute). Eg.

http://www.15seconds.com/issue/040105.htm

I can see no advantage of using a 3rd column in the middle and
would not because you'd be using that table column only for
layout purposes.

I must strongly disagree with the guy who said use a 3 column
table.

I, myself, would be tempted to use some from of table-less css
layout myself, google "table-less form css", as the purists do.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top