SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru
    Join Date
    Feb 2007
    Posts
    873
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Div or tables better ?

    Dear All,
    I am creating a side where on the left hand side I have a number text box,combo box etc which makes the form. On the right hand side I have grid which is made from from table tr and td combination. Overall the whole form and data grid is also stored in a big table. So is this a good method or I must use other method. The problem is now I would like to stored anothe datagrid below my existing datagrid. Any advice?

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,608
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by newtomysql View Post
    Dear All,
    I am creating a side where on the left hand side I have a number text box,combo box etc which makes the form. On the right hand side I have grid which is made from from table tr and td combination. Overall the whole form and data grid is also stored in a big table. So is this a good method or I must use other method. The problem is now I would like to stored anothe datagrid below my existing datagrid. Any advice?
    If you are displaying tabular data put it in a table. If you are creating separate divisions within your page put them in divs. If the page content is something else then put it in theHTML tags that correctly identify what type of content it is.

    You then determine how it is all laid out on the screen using CSS.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Fellgall pretty much hit it on the head -- HTML is for saying what things are NOT how they appear, so if it's tabular data, go ahead and use a table... if it's NOT tabular data then you have no business using a table...

    Though we're guessing wildly without actually seeing the page in question.

  4. #4
    SitePoint Addict AtSea webdesign's Avatar
    Join Date
    May 2010
    Location
    Newark, Delaware
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good points here. One thing to add. Make sure you do NOT use nested tables for your data grid.

  5. #5
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,608
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    Nested tables almost never make sense because that implies that one of the pieces of data within your tabular data is itself a table of data.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


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
  •