Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Best practices - tables

Options
  • 25-08-2010 5:59pm
    #1
    Registered Users Posts: 6,465 ✭✭✭


    Am I misreading something here, or is this just plain bad advice? :confused:

    From Apple's developer site, web development best practices:
    Ensuring that the footer works properly on both long and short pages is a common cause of CSS headache.
    Tables

    Tables neatly solve these two problems. Correct horizontal alignment has been the most important advantage of tables ever since Mosaic. Giving the table a height: 100% and the cell containing the footer a vertical-align: bottom makes the footer reliable in all circumstances.

    If the visual design of your web site requires complex horizontal alignment or a reliable page footer, minimal tables could help you evade complex browser incompatibilities.
    ....
    Using pure CSS in all circumstances will have to wait until all browsers support CSS fully. If you've honestly tried to use CSS but encountered serious browser incompatibilities in the rough positioning of the content blocks, you should switch to minimal tables.

    This is when talking about positioning your basic page blocks - header, footer, etc. Surely if you can't get that done due to 'browser incompatibilities', the rest of your page is going to turn into a table fest?


Comments

  • Registered Users Posts: 1,829 ✭✭✭lil_lisa


    Personally, I hate tables. They don't really lay out content the way you want them too. They just make it look like that. My websites are 100% divs and I know all about browser compatibility, you just have to tweak how you lay your divs out and use different styles. I know there are a lot of people who still believe in tables and still depend on them a lot, I did too. I found that if I wanted to move anything around I would have to rearrange almost everything but with divs its a lot easier. Especially when it comes to headers and footers.


  • Closed Accounts Posts: 1,200 ✭✭✭louie


    Apple is more referring to iPhone applications where TABLE's are the best.
    For a normal website I reckon DIV's


  • Posts: 0 [Deleted User]


    Divs all the way, unless the html is for emails newsletters. Obviously nothing wrong with using tables for tabular data - just not for layout.


  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    louie wrote: »
    Apple is more referring to iPhone applications where TABLE's are the best.
    For a normal website I reckon DIV's

    No need for tables for layout in iPhone web apps - list tags are the usual in the main frameworks.
    Obviously nothing wrong with using tables for tabular data - just not for layout.

    You would think that this would be obvious - but a lot of people seem to put everything into divs, where tables would be the semantically correct choice.


  • Closed Accounts Posts: 285 ✭✭Plebs


    I mostly use divs and alter between float, default and absolute positioning.

    Tables are useful for certain types of data. Usually small bits of data. I often use tables for dumping data to my web browser so it can be easily copied/pasted into a spreadsheet.


  • Advertisement
  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Updated: 2008-02-07
    I'd be surprised if these were still considered best practises.


  • Registered Users Posts: 1,452 ✭✭✭tomED


    Why does everyone freak out when they hear the "tables" word when it comes to web design nowadays?

    Right we all know that tables are not best practice any more, but this document was written in 2008 and to me it's fairly good advice.

    I read that paragraph in context and to me it says "if all else fails and you can't get it working in the browser you need it to, just use tables, but sparingly".

    I think that's a fair statement. Even now in 2010 some strange people are still using browsers that can't handle CSS properly - the latest coding standards omit those people. So for me, that is just a PC correct way of not getting into detail with those silly enough to be using ancient browsers.

    It's really not something worth dragging up the whole tables versus DIVs argument again is it!!??

    :P


  • Registered Users Posts: 180 ✭✭Collumbo


    As a general rule, I use this -- divs for page structure and layout, tables for multi-column display of data in rows. I know it is of course possible to do the entire lot with divs, but is it worth it?

    Interestingly, an article in ".net" magazine recently had a tutorial on "how to create beautiful css tables"... and they kind of trumpet the whole "perfect web site" discussion in every issue.


  • Registered Users Posts: 1,801 ✭✭✭cormee


    Collumbo wrote: »
    As a general rule, I use this -- divs for page structure and layout, tables for multi-column display of data in rows. I know it is of course possible to do the entire lot with divs, but is it worth it?

    Interestingly, an article in ".net" magazine recently had a tutorial on "how to create beautiful css tables"... and they kind of trumpet the whole "perfect web site" discussion in every issue.

    You should only use tables for tabular data - if it's laid out using divs and you switch styles the 'table' will most likely lose all structure and meaning, plus divs won't have any accessibility aids such as summary, caption, headers etc.


Advertisement