Tables Vs. Divs

Discussion in 'Web Design and Development' started by timmillwood, Feb 27, 2007.

  1. timmillwood macrumors 6502a

    Apr 7, 2006
    I have always used tables to design my sites and can see alot of benifits to go with Div and CSS, but i like being able to switch between code and WYSIWYG in dreamweaver, cant seem to find a good program with WYSIWYG div & CSS and code.

    any tips?
  2. tehybrid macrumors member

    Nov 21, 2006
    tables are considered bad web design because tables render different in different browsers
  3. panoz7 macrumors 6502a


    Nov 21, 2005
    Raleigh, NC
    And CSS doesn't?

    I went from completely table based designs to completely css based designs over a few months. I've never regretted learning a new technology so much. Table based designs and CSS based designs both have advantages and disadvantages. CSS makes for cleaner code once you're done... but that comes at the cost of never being sure how your site is going to render in a new browser. I never had that trouble with table based designs.
  4. rogersmj macrumors 68020


    Sep 10, 2006
    Indianapolis, IN
    Well, that's part of it, because to be fair CSS renders different in different browsers too. IE's different interpretation of CSS is a big headache for everyone, especially.

    OP: Probably the closest thing you're going to find for WYSIWYG for good CSS editing is CSSedit. It's an excellent program, although can be daunting for people new to CSS. It's not quite the same type of tool as Dreamweaver however. To my knowledge, there aren't many tools out there like Dreamweaver for the pure div/CSS side of the fence because there's so many, many different ways to do something, and usually requires the human touch. Most developers just prefer to write the CSS themselves in a decent text editor.
  5. cookie1105 macrumors 6502

    Mar 27, 2006
    London, UK
    No, table based layout is considered bad web design because it is not semantically marked up.This means that you cannot determine the information in the data. You can't tell whether a piece of text is a header or a paragraph. The correct application of tables is to present data.

    If you semantically markup your text (give it header & paragraph tags), then even if you disable all css styles it will still render coherently in the simplest text-based browser.

    Funnily enough table-based layouts give you a large degree of control over how your page renders in different browsers.

    Another vote for CSSedit if you want a WYSIWYG editor. But it's definitely worth the effort to learn how to code CSS. If you get yourself a decent book the learning curve isn't that steep. Elizabeth Castro's is excellent.
  6. radiantm3 macrumors 65816


    Oct 16, 2005
    San Jose, CA
    You can handcode in cssedit. I use cssedit to debug and test styles on live sites and am always in advanced (code view) mode.
  7. nightelf macrumors 6502

    Mar 25, 2003
    I use a mix of both.

    DIVs are cleaner, but a PAIN! Tables are a mess but more reliable.
  8. Westside guy macrumors 603

    Westside guy

    Oct 15, 2003
    The soggy side of the Pacific NW
    Tables aren't flexible in terms of object placement, since you have to jump through all sorts of awkward hoops if you're not laying things out in a grid. But of course the "real" argument for CSS is that content should be separated from layout. Well, that's the goal anyway - it seems like there's always some little piece of a design where that doesn't work for some reason or another.

    When all you're doing is writing a few pages, it's hard to get too worked up about the CSS versus tables arguments. But try changing the underlying design of a tables-based website that has a few hundred pages, and you begin to understand why separating content and layout actually matters.
  9. cookie1105 macrumors 6502

    Mar 27, 2006
    London, UK
    yes, of course you can but as far as I know it won't let you handcode any other languages (please correct me if I'm wrong). If you are handcoding css then I think it's downright pointless not to handcode your html as well. Admittedly I haven't spent a huge amount of time in CSSedit, but at the time it seemed like a perfectly functional app.
  10. iGav macrumors G3

    Mar 9, 2002
    For some reason as a designer, divs just make a lot more sense to me, I never did quite get my head around tables, especially when it came to hand coding. CSS is a breeze.

    Been using CSS-P exclusively now for almost 5 years, can't say I find browser compatibility and consistency outside of IE to be a problem. It's not rocket science getting near identical results from Safari, Firefox/Camino and Opera.

    I keep hearing good things about this CSSedit, I usually hand code in BBEdit so I might have to have a tommy gander.
  11. dejo Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    I still think side-by-side elements are easier with tables than with divs. Same with vertical centering.
  12. atari1356 macrumors 68000


    Feb 27, 2004
    I use both as well - usually tables for the overall structure of the page, then CSS for controlling individual elements.

    Yep, that's why I use server side includes and keep the basic layout in .htmlf files - seperate from the content. Failing that, you can always do a multi-file search and replace which has never seemed that big of a deal to me using either BBEdit or Textmate.
  13. cookie1105 macrumors 6502

    Mar 27, 2006
    London, UK
    That's really cool, I'd never thought of that. But then again I'm a bit of a server-side scripting noob. Am teaching myself PHP/MySql at the moment.

    Laying everything out with tables was never really an option for me as I only got interested in webdesign & development about 2 years ago. I wouldn't say CSS was a breeze to learn, but once grasped it really is quite awesome. I find the final layout debugging for cross browser compatibility a real PITA however. I might try out SSI next time.

Share This Page