Design with many inputs in a row

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


It looks like this is tabular data (with columns relating to the months) so I’d suggest using a table for this.

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.

Hi mjw356. Welcome to SitePoint. :slight_smile:

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.

Gotta agree with Ralph on this one, and not just because he’s green :slight_smile: This is a classic tabular structure and requires a tabular layout.

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.:slight_smile: