Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 3 123 LastLast
Results 1 to 15 of 45
  1. #1
    Regular Coder
    Join Date
    Oct 2002
    Posts
    380
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Layout -- tables or divs

    I generally prefer to use sized divs for a page layout, but I have one problem, which means they don't see to work.

    On a basic page layout, I normally have a side bar on the left, a main content section next to it, and a footer below it. The problem is I want to place the footer below the lower of the two side sections, each of vary in height, depending on the page content.

    In a table, this is easy. You make the side and main content in one row, then the footer in the following row. With absolutely positioned divs, I can't work out how to do it.

    Does anyone know a way to make it work?

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Location
    Burlington, VT
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts
    a very good resoursce for css div layout.
    http://glish.com/css/

    -Doug
    "The focused mind can pierce through stone."
    - Japanese Maxim

  • #3
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    The phrase "If it ain't broke, don't fix it" comes to mind.

    If tables have worked for you in the past why use positioned layers now?
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #4
    Regular Coder
    Join Date
    Oct 2002
    Posts
    380
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Spookster
    If tables have worked for you in the past why use positioned layers now?
    Because I want to know how to make it work.

    And, more importantly, tables don't inherit all css properties correctly (eg you need to re-specify the font-face for the table, whereas the div will inherit from the body tag). I'm using tables, because overall layout is more important than one or two formatting tweaks; but it'd be nice not to have that to worry about.

    I think, from that link posted, it might be possible using margins on the divs. Let me see if I can make this work.

  • #5
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Originally posted by Spookster
    The phrase "If it ain't broke, don't fix it" comes to mind.

    If tables have worked for you in the past why use positioned layers now?
    Because you are never supposed to use tables for layout, and never were.

  • #6
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Originally posted by jkd


    Because you are never supposed to use tables for layout, and never were.
    Says who? They work great for layout. They are the foundation of most all sites.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #7
    Regular Coder
    Join Date
    Sep 2002
    Location
    Burlington, VT
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts
    says the internet gods

    tables were never designed to be used for layout, only to hold data. A true layout system for the html wasn't designed until the <div> tag came about
    Tables should be used to mark up truly tabular information ("data tables"). Content developers should avoid using them to lay out pages ("layout tables").
    http://www.w3.org/TR/WCAG10/#gl-table-markup

    -Doug
    "The focused mind can pierce through stone."
    - Japanese Maxim

  • #8
    res
    res is offline
    New to the CF scene
    Join Date
    Oct 2002
    Location
    Reading
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    a very good resoursce for css div layout.
    http://glish.com/css/

    -Doug


    Cheers for the link Doug, i have been looking for a site like this all my life (well a few weeks anyway)....

    I have been looking to convert my departments website for a while now, this gives the best examples that i have seen....

    Cheers,

    Richard Sherwood

  • #9
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Originally posted by Spookster
    They are the foundation of most all sites.
    And this is why the Internet is the inaccessible place that it is, full of proprietary presentational hacks and such.

  • #10
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by dauvm
    a very good resoursce for css div layout.
    http://glish.com/css/
    wow... thats alot more helpful than i had expected it to be. i guess i'd better change my tables to <div>'s if this is the case... although i had always been in the illusion they were for positioning...

    *deep thoughtfull "hmmmm.........." *
    redhead

  • #11
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Originally posted by jkd


    And this is why the Internet is the inaccessible place that it is, full of proprietary presentational hacks and such.
    Well I've been using table layouts for 7 years now and all the sites that I have done are accessible and render exactly the same in all versions of all browsers.

    The same cannot be said if you use positioned layers as all version of all browsers do not support layers in exactly the same way or have slight differences in rendering.

    Reality check here guys.

    As a professional web developer there is nothing wrong with using tables to layout a page.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #12
    Regular Coder
    Join Date
    Sep 2002
    Location
    Burlington, VT
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Spookster

    Well I've been using table layouts for 7 years now and all the sites that I have done are accessible and render exactly the same in all versions of all browsers.
    All browsers huh? How about screen readers, braile readers? How do your table layouts degrade when tables are disabled? Is the information you want to show still in a logical order? If so, more power to ya But chances are that what you think is "accessible" is really only accessible to the kind of browser that you are used to dealing w/. Blind people get the short end of the stick when it comes to the internet (more often than not). I recall in a post the other day that someone critisized the w3c's site for it's blandness... too true! but I think it serves as a very good example of accessiblity. You can turn off css, tables, images, javascript, even your mouse (blind people don't use "mouses?"), and THEN view that in greyscale (colorblindness), and you still get a 100% fuctional site... I think that's cool.

    It takes forever and it's boring as hell, but you really do learn a lot if you read through the accessiblity guidelines in the w3c link above.

    btw - I'm glad you all enjoyed that layout link, I found it particulary enlightening myself!

    -Doug
    "The focused mind can pierce through stone."
    - Japanese Maxim

  • #13
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    577
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Out of the 4 main browser creators (yup - counting moz and netscape as different entities), only opera doesn't use tables at all on their site.

    I figure that if the sites for the main browsers are still using tables then I too am pretty safe doing the same.

    Nice link to the css place - anyone else notice that they offer $3750 for each 'used' link that is submitted.
    Ökii - formerly pootergeist
    teckis - take your time and it'll save you time.

  • #14
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Originally posted by dauvm
    All browsers huh? How about screen readers, braile readers? How do your table layouts degrade when tables are disabled? Is the information you want to show still in a logical order? If so, more power to ya But chances are that what you think is "accessible" is really only accessible to the kind of browser that you are used to dealing w/. Blind people get the short end of the stick when it comes to the internet (more often than not). I recall in a post the other day that someone critisized the w3c's site for it's blandness... too true! but I think it serves as a very good example of accessiblity. You can turn off css, tables, images, javascript, even your mouse (blind people don't use "mouses?"), and THEN view that in greyscale (colorblindness), and you still get a 100% fuctional site... I think that's cool.

    It takes forever and it's boring as hell, but you really do learn a lot if you read through the accessiblity guidelines in the w3c link above.

    btw - I'm glad you all enjoyed that layout link, I found it particulary enlightening myself!

    -Doug
    Well actually screenreaders read table layouts just fine. However screen readers do not read layers very well. I am quite familiar with that technology and using the Bobby software to make a site compliant with screenreaders as I do quite a bit of web development for a university that requires the sites to be screen reader accessible.

    So please get off your high horse now.

    Just because you read something somewhere or hear something from someone does not mean that is factual. Have you had any actual experience with this? Or is that just what you read? Have you actually even used a screen reader? I have.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #15
    Regular Coder
    Join Date
    Sep 2002
    Location
    Burlington, VT
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    ok spooks, no hard feelings man.
    " Is the information you want to show still in a logical order? If so, more power to ya "
    The last thing I want to do is get in some internet **** fight... I was not trying to belittle you or your work... I'll rephrase... "...But chances are that what MOST PEOPLE think is "accessible" is really only accessible to the kind of browser that they are used to dealing w/"

    btw, I have used a screen reader, and it handled tables well also, but I have read in numerous sources that older screen readers linearize tables... I'll take their work for it.

    -Doug

    P.S. I don't have a horse
    "The focused mind can pierce through stone."
    - Japanese Maxim


  •  
    Page 1 of 3 123 LastLast

    Posting Permissions

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