#1
  1. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jan 2004
    Location
    Budapest
    Posts
    1,703
    Rep Power
    67

    HTML Tables vs. CSS


    Hello, I am beginning to venture into the world css and must say I really like it. I am curious about something though. A lot is eluded to insofar as the replacement of tables in html using positioning with css. Are tables bad for some reason? I am very curious as to this issue.
    Today the world, tomorrow the universe...
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Stratford-upon-Avon, UK
    Posts
    66
    Rep Power
    12
    Hi

    Why are tables 'bad'?

    Not all browsers render them the same.

    You often need tons of code to force the style you want.

    Why are positioned div's so good?

    Easy to code.
    Use CSS (So good for XHTML and XML)
    Cross browser friendly (although beware of a bug in IE that sometimes renders borders wrong).

    It is only a matter of time before XHTML becomes standard, and soon after then XML (XHTML rules are, in effect, a subset of XML).

    Most designers shy away from positioned div's because fot he difficulty of designed a 3 columned layout where all the columns are the same height, because normally they would only be as high as each column's content dictated.

    This site (mine) shows how to get round this problem and will make your code for you. Up to 3 columns, header and footer, borders, background colors, all done. Choose the widths and left or centered:

    http://207.44.137.103/css_variable_b..._pagemaker.php




    Trevor
    "Good artists copy, great artists steal." Pablo Picasso
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Dec 2003
    Posts
    1,037
    Rep Power
    27
    Tables are really for tabular data, so they should still really be used for anything that you would put into a table if you are using a word processor or writing something on paper. Divs are a lot nicer, not only because of the reasons mentioned above, but I for one like them as it allows me to put every single bit about the look of a site into one file, so if I want to change the look throughout a site (though nothing ever leaves my computer, so it is a little pointless in a way), there is only one file to change instead of having to go and redo tables.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jan 2004
    Location
    Budapest
    Posts
    1,703
    Rep Power
    67
    Hey guys, thanks so much. Your replies were excellent and just what I need to hear. Thanks.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Location
    Los Angeles
    Posts
    131
    Rep Power
    12
    CSS layouts also have the advantage of being viewable on a variety of devices (Monitor, printer, pda, etc.) just by changing a stylesheet.

IMN logo majestic logo threadwatch logo seochat tools logo