SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2005
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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

    Vicky..
    Attached Images Attached Images

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,173
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    It looks like this is tabular data (with columns relating to the months) so I'd suggest using a table for this.

  3. #3
    SitePoint Member
    Join Date
    May 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,173
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Hi mjw356. Welcome to SitePoint.

    Quote Originally Posted by mjw356 View Post
    If you are a stickler for web standards you probably want to use a single div
    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.

  5. #5
    SitePoint Wizard bronze trophy Black Max's Avatar
    Join Date
    Apr 2007
    Posts
    4,029
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    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.

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,353
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    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.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •