1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Are Nested Table Layouts That Bad

Discussion in 'HTML & Website Design' started by ramnet, Sep 30, 2009.

  1. #1
    I've been reading a lot on HTML lately and it seems the general sentiment is that nested tables for layout is a bad idea.

    Is this true, and if so, why? After all, many popular sites are using table layouts (even this one), so why are they being discouraged?
     
    ramnet, Sep 30, 2009 IP
  2. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #2
    tabular data is what tables are made for (im sure you read that a hundred times) but the big reason for non-table based layouts is the filesize and readability - its not going to "hurt" your site if it uses tables but will be easier to maintain and built CSS patches for in the future when new web-brower versions come out. not to mention it will load faster because of filesize and because the entire table has to be rendered before anything will display on the screen - not with divs :)
     
    ccoonen, Sep 30, 2009 IP
  3. rgblogs

    rgblogs Active Member

    Messages:
    239
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Using Tables is now a very old thing.
    CSS helps in maintaining and updating sites easily
     
    rgblogs, Oct 1, 2009 IP
  4. ramnet

    ramnet Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    With nested tables is that even an issue at all?

    Correct me if I'm wrong, but nested html tables render basically the same way everywhere - wouldn't increased browser support be an advantage here?

    And if one uses nested tables then the need for CSS as a layout tool - and all the overhead of checking everything for incompatibilities between browsers - goes away doesn't it?
     
    ramnet, Oct 3, 2009 IP
  5. dulcificum

    dulcificum Active Member

    Messages:
    535
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    68
    #5
    Die tables die!
     
    dulcificum, Oct 3, 2009 IP
  6. myst_dg

    myst_dg Active Member

    Messages:
    224
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #6
    Tables are not for layouts.
     
    myst_dg, Oct 3, 2009 IP
  7. 5867dude

    5867dude Peon

    Messages:
    266
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Nested Table Layouts require every page on the site to be changed, wheras CSS can be stored in a seperate file and all changes made to that one file change every page.:D
     
    5867dude, Oct 3, 2009 IP
  8. tguillea

    tguillea Active Member

    Messages:
    229
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    90
    #8
    I use nested tables; I haven't been able to find a way to make the page height dynamic with divs.. Somehow it never works out as I'd mean it to, so tables work better IMO
     
    tguillea, Oct 3, 2009 IP
  9. Grit.

    Grit. Well-Known Member

    Messages:
    1,424
    Likes Received:
    22
    Best Answers:
    1
    Trophy Points:
    110
    #9
    CSS is the best way to create layouts, it is a lot more fluent etc. I've preferred CSS since i started using it, it's so much more efficient and powerful, and documents are a lot easier to change layouts with since you don't have to change the whole set of pages that contain the table layout.
     
    Grit., Oct 3, 2009 IP
  10. jamesicus

    jamesicus Peon

    Messages:
    477
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Table based layout markup is not as easy to modify as CSS generated layout -- Table based layout may not render well in small screen devices (PDAs, Cell Phones, etc.) however, Table generated layout is not always undesirable: http://www.webaim.org/techniques/tables/

    James
     
    jamesicus, Oct 3, 2009 IP
  11. akramabs

    akramabs Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    tables are just made for showing data... tables were never made for layout.. always try to separate logics... markup (X)HTML and CSS ( presentation ) ...
    If you create a page in table-based... and you show your table-based page to a developer.. then he/she will definitely go mad... it will be very tough time for him/her to continue work...
     
    akramabs, Oct 3, 2009 IP
  12. designedbyjackie

    designedbyjackie Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    i still use tables as ive been coding for 12 years. At some time when layers showed up i couoldn't stand them, then divs came on. I have mixed feelings about these still

    I can write CSS/XHTML in my sleep, working with tables are just so much easier. And if your gonna create a template for ebay?? forget CSS layout!
     
    designedbyjackie, Oct 3, 2009 IP
  13. dulcificum

    dulcificum Active Member

    Messages:
    535
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    68
    #13
    "Peon". Sounds about right.
     
    dulcificum, Oct 3, 2009 IP
  14. Chaps

    Chaps Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    overflow:auto;


    It's simple. There is no excuse for using Tables anymore.
     
    Chaps, Oct 3, 2009 IP
  15. Chaps

    Chaps Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    If you find tables so much easier, I'm doubting you can write CSS in your sleep.

    CSS is easier, and far more flexible than tables.
     
    Chaps, Oct 3, 2009 IP
  16. designedbyjackie

    designedbyjackie Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    tables are easier for me, as i have been hand coding them since 97. I have only recently over the last few years using CSS first it was for font type stuff, now im into the layout overall.

    Im still trying to use CSS where possible because that is where the WWW headed too. However its hard to teach an old dog new tricks... :)
     
    designedbyjackie, Oct 4, 2009 IP
  17. Chaps

    Chaps Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #17
    That I can agree with. If one is more familiar, it will be easier. But I think once a person gets as fluent with CSS as they were with tables, you realize it is a much more efficient and flexible way to develop.

    I've been coding since about 1999. It was just within the past year that I decided to go CSS strictly. But I would never even think about going back.
     
    Chaps, Oct 4, 2009 IP
  18. goliath

    goliath Active Member

    Messages:
    308
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #18
    Break yourself of this habit. That's the best advice I can give you. I started with HTML in 96-97 as well. I hated CSS, it was so convoluted and confusing to me.

    In '06, I stopped developing, and swore I wouldn't do another site until I understood CSS and could make an educated decision. One night I found myself at http://csszengarden.com/ . I will never be able to thank those guys enough for what they showed me. Understanding what is going on there was like a dam bursting in my head, I was blasted out of my seat.

    I've never looked back. Look at this:

    http://default.minisiteframework.com/
    http://template1.minisiteframework.com/
    http://template2.minisiteframework.com/
    http://template3.minisiteframework.com/
    http://template4.minisiteframework.com/

    Every one of those pages has the EXACT SAME HTML STRUCTURE. They're all generated by one script. I've changed some of the content to suit each layout, so csszengarden is a "purer" example.

    Table based-layouts are bad news. Nested-table layouts are the hallmark of the amateur designer any more, just as the mindless "tables are bad even for data" mindset is.

    As for google, google has published articles about how and why they ignore common design techniques and even language specifications where it suits them. They are about volume, and leaving off closing tags (for instance) saves them gigabytes of bandwidth every day.

    That DOES NOT make it a bad practice to use the language correctly, it means that a company who specializes in volume data has made a compliance/performance tradeoff.

    EDIT: I"m not saying those layouts I posted are great, they're under development ;)
     
    Last edited: Oct 4, 2009
    goliath, Oct 4, 2009 IP
  19. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #19
    I see i'm in the opposite boat, as i've never actually learnt how to use tables for layouts, well thanks to this forum mainly and constantly being guided in the correct direction.

    I can understand however those of you who have always used tables, finding it hard to make the change, but the time is coming, well it's already here, where you're not going to get paid unless you know the "tableless" way.

    So what if you find it easier, that's fine if you're prepared to put up with markup consistent with toilet paper. If you're going to do it properly, do it properly, have some standards, and those are not to use tables. The point is this discussion isn't a discussion i'm sorry, tables were like 1997, and the discussion took place between 1997-2003, now there's no questions to be asked, just deal with it and stop using tables for layouts.

    The only reason topics like this get posted is because when newbies start to learn HTML and don't use Google properly they come across 1997 sites who teach tables for layouts. Then they come across a modern article, and start asking questions..
     
    wd_2k6, Oct 4, 2009 IP
  20. goliath

    goliath Active Member

    Messages:
    308
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #20
    I completely agree with you. For those of us who started with tables, the transition can be HARD. This is because tables/slices are simple and intuitive. They perform consistently because of their simplicity and that makes it a huge shortcut for so many. And once you're used to working that way, well it's hard to get out of the rut. I was really sorry, when I finally "got" CSS and started using it, that I didn't tackle the headache sooner.

    The number of people who say they "know" CSS and still prefer tables really surprises me. Of course, I learned some new CSS2.1 techniques on this forum in the last two days, and I consider myself to have "advanced CSS" skills.

    You can never stop moving forward.

    How much code do you think a WYSIWIG generator would create to nest this in tables:

    http://dailyscope.info/

    Again, while I'm not saying this is a great design example, view the source on this page and then answer me this:
    Would you do this layout in tables?

    And as far as the topic, here's one for those who "never found anything they couldn't do with tables", I'm putting my money where my mouth is for you with a challenge.

    The first person to post that layout with tables and LESS THAN 2 TIMES THE HTML CODE THAT I USED can expect $5 via paypal.

    You have to include all of the same image paths/alt tags/titles and other page elements as is.

    Whitespace will be stripped and comparison will be made by character count.

    You have to post your results publicly and announce it here in the forum to collect. Everyone has to see.

    Remember, less than 2x the code by character count, and all layout/positioning is done with tables. Anyone up for it? I haven't tried it and I'm sort of shooting off at the mouth here.

    I'll be out for a couple of hours this evening but you WILL get paid, within 30 minutes of me seeing the entry. If you can do it I'll happily eat my words, and the $5.
     
    Last edited: Oct 4, 2009
    goliath, Oct 4, 2009 IP