Results 1 to 7 of 7

Thread: Tables -vs- Divs -vs- ... w/e else

  1. #1
    Join Date
    Mar 2007
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Tables -vs- Divs -vs- ... w/e else

    So I hear people hating on tables because they were devised as a way to display information that needed a table. But I also hear people who are against divs. So what is the overall best choice (Whether it be tables, divs or otherwise) in creating your average, everyday website?

    Please tel me, I am very curious.

  2. #2
    Join Date
    Jun 2006
    Location
    Acton Ontario Canada.
    Posts
    677
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    divs are designed for page divisions, while tables are for tabular data.
    For layout, use divs.
    For data, use tables.

    Who hates divs?
    - Ryan "Boxxertrumps" Trumpa
    Come back once it validates: HTML, CSS, JS.

  3. #3
    Join Date
    Mar 2007
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Just different sites I have found over time that have a blog entry or the equivalent complaining about divs. I personally use divs. But, with divs, how do you overcome the problem of someone having their screen at a higher resolution so that there isn't so much extra space around your layout.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I've never seen anything like that. Tables are bad to use for layout because they're not meant to be used for layout (resulting in semantically incorrect markup), they result in a lot of presentational HTML that's hard to maintain and has to be downloaded every time someone views your page, and nested tables are very slow to render.

    "Using <div>s" isn't a design methodology. The <div> element is a generic block-level element without semantics that's used in page layouts to apply style to parts of a page.
    But, with divs, how do you overcome the problem of someone having their screen at a higher resolution so that there isn't so much extra space around your layout.
    Thus, that's not a problem of "using <div>s," but of the specific CSS layout you've been using. If you use a more fluid layout, this won't be a problem.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Who hates divs?
    people that don't know css tend to hate divs

  6. #6
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Unless you know CSS with a fair amount of ease, writing page layouts with DIV's isn't easy. Personally, I think, with a good tutorial on anything it can become "easy", or natural.
    Though aside from page layouts, tables seem easier to write when encourperating other scripts, such as a data generator via PHP. Gives a better idea of the column/row structure.
    - Mike

  7. #7
    Join Date
    Apr 2007
    Location
    Phoenix, AZ
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    with divs, how do you overcome the problem of someone having their screen at a higher resolution so that there isn't so much extra space around your layout.
    You can't (and probably don't even want) to control every bit of everyone's browsing experience. People can resize their browser window so it's really big or really small, change the text size, turn images on or off-- all sorts of things. The best thing to do is to make your designs so they adapt to these variables.

    (As for that specific question, I usually like to center my designs in the browser window, so you at least get even space on both sides.)

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
  •