usability_mantra — 2011-05-24T13:20:25-04:00 — #1
I need to design a form with many input fields in a row (around 15). What is the best approach to design such a layout. Shall I use table or Div? Pls see the attached screenshot. This is an application with lot of data being displayed in 15-18 small text boxes in a row. see the attachment
ralphm — 2011-05-24T20:18:12-04:00 — #2
It looks like this is tabular data (with columns relating to the months) so I'd suggest using a table for this.
mjw356 — 2011-05-24T20:18:31-04:00 — #3
I think you can really use either for this type of layout. If you are a stickler for web standards you probably want to use a single div and put the form within that div. Howver, I would probably just use a table in this case because it would be a heck of a lot easier across browsers.
ralphm — 2011-05-24T20:31:49-04:00 — #4
Hi mjw356. Welcome to SitePoint.
Be careful there. Web standards are about meaningful code, and if you are dealing with tabular data (that is, data that is related by columns and/or rows) as seems to be the case here, then web standards advocate using a table. Though tables for page layout are not recommended, there is nothing wrong with tables per se. They still have an important role.
black_max — 2011-05-24T21:52:11-04:00 — #5
Gotta agree with Ralph on this one, and not just because he's green This is a classic tabular structure and requires a tabular layout.
paulob — 2011-05-25T07:32:00-04:00 — #6
Usually form controls aren't tabular data but I think that a table would be best in this case as you have a correlation between rows and columns which is tabular data territory.:)