[HTML] Table sizes

Discussion in 'Web Design & Coding' started by Glaanieboy, Mar 11, 2004.

  1. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    As you can see on http://glaanieboy.dyndns.org/design/, I have a giant table (I left the boarders intact, so it's easy to view), with 3 seperate columns. I have set the width to 100%, which works ok. But the height is giving me a problem. I want it to stretch out all the way to the bottom, but I just can't do it. If you view the source code, you see I have set in both <table> as in all the <td>'s a height of 100%, but it just doesn't work. Help me!
     
  2. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    height isnt a valid table tag, try using CSS positioning to set it say x from the top and x from the bottom, or maybe margin-bottom
     
  3. Ded Morozh

    Ded Morozh I don't DISlike you...

    Messages:
    125
    Location:
    Toledo, OH, US of friggin' A
    The height tag will work in a table, but you should set it in pixels. As it is it's fine, you don't have enough content in the table to extend down the page.
     
  4. PseudoKiller

    PseudoKiller Zug Zug

    Messages:
    3,858
    Location:
    Ice Crown Citadel
    height is a valid table attribute... in % or pixels. What is messing it up is the info at the top

    <!--DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

    add the 2 -- in red above and it works...
     
  5. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    According to the w3c.org website, these -- shouldn't be there:
    http://www.w3.org/QA/2002/04/valid-dtd-list.html

    @Geffy, I did consider that, but I figured it should work with plain HTML too. Nevertheless, I shall try it.

    @Ded Morozh, that would mean if someone browsed my site with a 960 vertical pixel resolution (I am developing this site @ 768 vert pixels), the table wouldn't be extended to the bottom and someone with a 600 vp resolution would have a table stretched out beyond normal resolution. If you know what I mean ;)
     
  6. PseudoKiller

    PseudoKiller Zug Zug

    Messages:
    3,858
    Location:
    Ice Crown Citadel
    up to you but it worked when I put in the -- go figure. Maybe a bug :confused:
     
  7. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Yeah. Weird...
     
  8. Graebob

    Graebob Generally Random

    Messages:
    241
    Location:
    Middlesbrough, UK
    as far as i can see, if you resize the window the table stays at 100% height anyway!
     
  9. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    CSS, not HTML.

    CSS was created to making the stuff that gets displayed all pretty, where as HTML was made as a markup langauge, as a way to tell the browser about certain text, not as a way to add the looks and stuff that it has grown out to be.
     
  10. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Alright. I gave up on the whole table align thing, I removed the borders, so at least you don't see it. I still find it strange when adding the -- it works, otherwise (as specified by W3C) it doesn't. Perhaps a bug, maybe intentional, who knows. I don't and I don't want to know. What's important to me, is that my site is being rendered properly in the popular browsers (Opera, IE, Mozilla/Gecko), if I break a rule, though luck.

    Right now I am recoding my shoutbox, so it will be better intergrated in the site and have better security and I will build a blog-system. But that doesn't have to do with my original question, so I'll stop. Thank you all for your help, it was greatly appreciated.
     
  11. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    the <!-- makes it into a comment so things ignore the doctype
     
  12. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    So I noticed. Ah well, it's not an issue now.