SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    SitePoint Zealot lightwithoutheat's Avatar
    Join Date
    Feb 2002
    Location
    Washington DC
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    to use CSS2 or tables for layout?... your opinion, please.

    Hey folks,

    I've seen many sites, including this one, coded using tables (for layout), but I've been slammed by other holier-than-thou coders who tell me that CSS2 is the ONLY right way to go. I've since started using CSS2 for my sites.

    My question is this: What is the better method? Is it wrong (unwise?) to use tables in site layout over CSS2?

    I need lottsa opinions on this one!!

    Thanks!

  2. #2
    morphine for a wooden leg randem's Avatar
    Join Date
    Jun 2002
    Location
    .chicago.il.us
    Posts
    957
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In a perfect world, the standards evangelist in me would come alive and say "CSS only".

    However, it's not a perfect world. Many people are still using browsers that have limited support, or no support at all, for CSS. Netscape 4.x is deplorable. Internet Explorer is weird on it's best day.

    Tables are, for the most part, the least-common-denominator. I still prefer to use CSS, of course. But when supporting the wider audience is important, you have to defer back to tables.

  3. #3
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use a mixture of the two. I'm not going to cease using tables until they are declared no-longer valid HTML entities by W3C (and at this time they are still valid in XHTML 1.0). CSS2 can provide various options that cannot be acheived with tables, on the other hand, however, many times are not implemented identically across multiple browsers, which causes problems. So, I use tables and CSS2 to acheive the best compromise.

    -Colin
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  4. #4
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For my site, I am designing the main template with CSS layers. Just a few months ago, I was completely against the whole WaSP movement, but I have converted into an evangelist for their cause. However, for old browsers, like Netscape 4, and text browsers, like Lynx, I am making a simple text-only version. If they want to see the site in its full beauty, they have to upgrade to a browser that's relatively new.

    I think that this is the best of both worlds. I would highly recommend it.

  5. #5
    morphine for a wooden leg randem's Avatar
    Join Date
    Jun 2002
    Location
    .chicago.il.us
    Posts
    957
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by qslack
    However, for old browsers, like Netscape 4, and text browsers, like Lynx, I am making a simple text-only version.
    If you use CSS effectively, the way it is really intended, you won't have to make a second version for those browsers.

    Best practice is to code the page for browsers like Lynx first, then add the CSS to make it look how you want in other browsers.

  6. #6
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Well, even though it sounds stupid "tables" are best left for showing tabulated data layout, and CSS for generally for overall page design. However as was previously stated we are not in an ideal world, so you might have to compromise somewhere.

    Therefore it's highly unlikely <table> will be depreciated from the forthcoming XHTML 2.0 recommendations.

  7. #7
    SitePoint Zealot lightwithoutheat's Avatar
    Join Date
    Feb 2002
    Location
    Washington DC
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for responding

    My scenario:

    I'm designing a site for IT professionals interested in IT developement in Third World countries. I need to code to older browsers, in a sense, because of the older systems that are still used in many less-developed countries. That happens to be my target audience as well as professionals here in the 'modern' world. I want to link them together.

    My presuposition from your statements is that using a mixture between the two is best, rather than going completely purist using CSS.

    So I need to find a bridge between the two that won't be a nightmarish maze of coding a separate site for each browser. I DO like the idea of creating a separate stylesheet with an autodetect however for each browser. I'd like your input on this idea. Ease of use?

  8. #8
    Don't get too close, I bite! Nicky's Avatar
    Join Date
    Jul 1999
    Location
    Lancashire, UK
    Posts
    8,277
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I think you should use CSS. As mentioned before, tables are meant to be for tabular data, not layout. And if your site designed with thought then you can use CSS only and have it degrade gracefully for those browsers that don't support it.

    I don't use tables in my personal website:
    www.nickydanino.com

    and it is still usable in older browsers.

  9. #9
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,811
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Total hats off to Nicky. I just checked it out in NS 4.7 and it is indeed entirely usable
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS

  10. #10
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think it is a good idea to try and use as much CSS as you can.....depending on what kind of layout you want, if it is something simple, all CSS should be fine....otherwise you will need a couple of tables........

    I too am trying to move to complete CSS....currently I do something similar to what qslack mentioned.....although my latest page is all CSS on the home page..... www.intra9.com if you are interested.......

    FOr what you are trying to do, I would just recommend playing around with a few different options until you get something that you are satisfied with....try pure CSS, and try some combos.......

    cheers

  11. #11
    SitePoint Guru nagrom's Avatar
    Join Date
    Jul 2001
    Location
    Western CT, USA
    Posts
    803
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    accessibility is another reason to go with CSS. it *is* actually law now....I'm not a lawyer but my basic understanding is that if your company has more than 15 employees, your website needs to be as accessible as your average Mcdonalds.

    using DIVs for layout lets you easily make a page that goes plain vanilla for non-CSS browsers (and things like text-to-speech browsers, PDAs, etc), looks nicer in newer ones, and protects you from having your pants sued off of you.

    i'm still guilty of tabled-layouts myself (though i'm building CSS layouts now). i think going forward though, everyone should get a client's signature stating they understand the implications, if they insist on tabled-designs.

  12. #12
    Gone!
    Join Date
    Aug 2001
    Location
    Witty Location Parody
    Posts
    3,889
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by TheOriginalH
    Total hats off to Nicky. I just checked it out in NS 4.7 and it is indeed entirely usable
    Yep, except I wanted to read "What Nicky's upto" and got a file not found here:

    http://www.nickydanino.com/blog/diary.shtml -- Tut tut

    I am getting very excited by table less designs. To quote from
    this site: why not just use CSS1 spec.

    Tables: for data only
    Back in the glory days of the Web, designers exploited the <table> tag to create grid-based designs. This was out of necessity because browsers simply couldn’t understand Cascading Style Sheets. Fast forward to the present; almost every current browser understands most of the first CSS specification and some of the second. Use tables for data only (think spreadsheets). Should you come in contact with someone using tables for presentation, firmly reprimand them and point them to this guide.
    Glen

  13. #13
    SitePoint Enthusiast Nerveman's Avatar
    Join Date
    Apr 2002
    Location
    Romsey, United Kingdom
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    I would definitely go the CSS route. Done properly your page will degrade gracefully and you will be pushing the web standards at the same time.

    Check out:
    http://www.thenoodleincident.com/tut...son/index.html
    and
    http://www.alistapart.com
    for some great techniques…

    I am currently re-coding my own site to these standards as we speak.

  14. #14
    SitePoint Zealot lightwithoutheat's Avatar
    Join Date
    Feb 2002
    Location
    Washington DC
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks very much y'all.

    I'm going to use CSS as I have in the past couple of sites I've done. I appreciate your input on this topic.

    You guys are great.


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
  •