www.webdeveloper.com
Results 1 to 11 of 11

Thread: CSS vs Tables for a layout

  1. #1
    Join Date
    Feb 2005
    Posts
    24

    CSS vs Tables for a layout

    Okay everyone. As far as CSS goes I know some basics, but not much more than that. Since I've started reading here the past few weeks I get the impression that the general consencious is that I should use CSS instead of HTML tables for a layout.

    My questions are:

    1. Is it true that I should use CSS, and if so, why?

    2. How does it work? I need to know how to do it. An explanation or link to a detailed tutorial would be helpful.



    Thank you for the help everyone..........Lan

  2. #2
    Join Date
    Dec 2004
    Location
    Neca Valley, Pennsyltucky
    Posts
    388

  3. #3
    Join Date
    Feb 2005
    Posts
    24
    Thank you for the link. I think I can see where I might want to, but I still only know very basic CSS. Does anyone know of any good tutorials that can teach me more about CSS and layouts?........Lan

  4. #4
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,175
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  5. #5
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    My recommendations are in my sig below.
    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan

  6. #6
    Join Date
    Oct 2004
    Location
    Ohio
    Posts
    66
    This is a good reference that points to other references: http://www.roderickhoward.com/cssdirectory/

  7. #7
    Join Date
    May 2006
    Posts
    17
    I think that css for many websites is better, because the css codes I just happen to think look nicer, and some of them you can combine with Javascript codes to creat neat clips and flash banners etc... The problem with css however is the 3 part codes for doing certain things, sometimes doing more than one image causes a probelm with using the css layout code to divide the page and a few other codes, creating a mess, simply cause you can't move it for part of another code being between it and the ending tag, this can creat a lot of probelms, but easy to fix, just be sure to know if the css is what is best, if you can't use the code, go for a short code of something else to do the same thing.

  8. #8
    Join Date
    Oct 2005
    Location
    Manchester UK
    Posts
    16
    There is only one logical answer for this as Tables were made to hold tabular DATA but were used for holding layouts together while CSS can have things like classes to hold a layout together by using DIVS and then styling them to make a layout.
    Dan Williamson - Web Portfolio

    Skillset: - (x)HTML, CSS, Web Standards, SEO

  9. #9
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    By taking the tables out of the page and using CSS you make the page source a lot smaller and faster loading. You avoid having related objects separated into separate table elements. You make it easier to add additional stylesheets for print, web readers, handhelds etc. Just to name a few of the most obvious benefits.
    Stephen

  10. #10
    Join Date
    Oct 2005
    Posts
    244
    Quote Originally Posted by ray326
    My recommendations are in my sig below.

    I reccomand the book in Ray326's sig.
    Bought it myself and it really helped me alot.

  11. #11
    Join Date
    Mar 2006
    Posts
    227
    Also, check out all the CSS information available through:

    http://www.alvit.de/handbook/

    CSS layouts can be frustrating at first when you're trying to learn them and you just keep thinking, "If only I was using tables, I would have this done already." But it's well worth it. I can't imagine trying to do a table layout now. Once you learn enough about CSS you realize that table-based layouts are seriously limited.

    Oh, and if you need some inspiration for some truly incredible CSS layout tricks just browse through some of the designs at:

    http://www.csszengarden.com

    It was looking through that site that finally convinced me that CSS layouts were worth it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles