Am I missing something about DIV vs Tables?

Discussion in 'HTML & Website Design' started by PHPGator, Jul 13, 2007.

  1. #1
    Okay, i've been designing for quite sometime. I've always used tables, I know how to manipulate them and can do a complete layout pretty quickly using tables. But it seems there are tons of experienced web designers/coders that have made the jump from tables to complete css layouts.

    When I start looking at it, it seems extremely confusing. And really, outside of the argument that tables are only meant for tabular (sp?) data, I have not seen a good argument to make the switch.

    Another reason which I would argue to be false is that it helps with SEO. But when I look at the source code for several of the top results in Google for competitive niches, the layouts are almost always done using tables. Take a look at "web hosting" in Google for an example. Probably one of the most competitive fields out there right now, the large companies topping the google search results are using layouts with tables.

    Another reason that makes me hesitant to switch is the way browsers use CSS. I can't count the number of threads in this section of DP related to why someones design looks good in one browser but has problems in another. I know that my table designs will look good in almost any browser.

    So, please, someone convince me why I should invest the time into learning how to do CSS layouts.
     
    PHPGator, Jul 13, 2007 IP
  2. Machi

    Machi Active Member

    Messages:
    540
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    60
    #2
    Imho the main reason why use CSS only layouts are other platforms. Web today isn't just for computers, it is for mobiles, PDAs or braille readers too. When u use table layout it'll be really unusable at this devices. In CSS you can define media="print, screen, projection,...." and this is very very usable feature...
     
    Machi, Jul 13, 2007 IP
  3. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #3
    These three posts I wrote in the last discussion on this topic will help you out. It's not just about search engines or saving bandwidth (and believe me, when your site's being spidered by a lot of search engines, they'll suck down a lot of bandwidth if you're using a lot more code than necessary, which is why i advocate a minimal markup style) or being portable, but also about accessibility.

    http://forums.digitalpoint.com/showthread.php?p=3693808#post3693808
    http://forums.digitalpoint.com/showthread.php?p=3694876#post3694876
    http://forums.digitalpoint.com/showthread.php?p=3700976#post3700976
     
    Dan Schulz, Jul 13, 2007 IP
  4. Cosmo Designs

    Cosmo Designs Peon

    Messages:
    247
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    here a simple reason, if you are using a left menu the code will look like this
    <table >.. <td> menu </td>... <td>content</td> < /table> , the SE will read the menu link then the content, and if you don't have a meta tag description on that page you will see the page in google like this : Page Title .. menu 1, menu 1...
    with a div and css it's simple to avoid this ,
    <div class="content"> blah blah content </div>
    <div class ="menu"> ..menu..</div>
    and if you put your page description on the first line it will look really nice.

    I'm a an old school table guy myself, hope I'm right with my explanation. :D
     
    Cosmo Designs, Jul 13, 2007 IP
  5. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #5
    also apart from the different viewing platforms (pda's computers, cellphones, etc...), tables add weight. have to be downloaded each time the website loads thus increasing load times. css on the other hand is downloaded once and then cached thus decreasing load times to just the amount of time that it takes to download the markup itself without visual styles. this should sum it up a bit for you http://hotdesign.com/seybold/everything.html
     
    ansi, Jul 13, 2007 IP
  6. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Any markup will add weight, not just tables. Tables tend to add more than necessary when used for layout -just like DIVs can when used improperly.
     
    Dan Schulz, Jul 13, 2007 IP