[HTML] Stretch a table to the bottom of a page

Discussion in 'Web Design & Coding' started by Glaanieboy, Sep 28, 2004.

  1. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Have a looksee here: http://glaanieboy.dyndns.org/develop/
    This is a new development version of my new website, so don't complain about how it looks.
    I have one big table, spreading across the entire page, which is divided into three columns, the left one being navigation and stuff, middle one is news and announcements and the right one will fit my shoutbox. As you also may see, the table stretches out over the entire width, but not the entire height. I use CSS, so I added height: 100% to class tablemain, but that didn't help. Same thing goes for adding height="100%" directly to the <table> tag of the main table.
    The only thing that makes it stretch out to the full height, is hardcoding the height in pixels, but I don't want that, for compatibility reasons in other resolutions.
    How can I make it dynamically stretch out over the entire height of the page?
     
  2. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    A table is by definition only as tall as it needs to be to represent the data it contains, this is one of the main reasons that tables are not really suited to layout control.
     
  3. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Hmm, well, it doesn't really matter, I just have to adjust my design so you can't see it. I have used borders now to see how the tables are aligned, but they will go away anyway in the final version.
    What are the other options? <div>'s?
     
  4. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    A div will work if the positioning is absolute. This is the only way I got it to work anyway. And having it absolute isn't always optimal or even possible.
     
  5. a1ehouse

    a1ehouse Chamone M*tha Fu*ka

    Messages:
    288