Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9
  1. #1
    Senior Member
    Join Date
    Mar 2002
    Location
    Warwick!
    Posts
    735
    Member #
    37
    This code:
    Code:
    <table height="100%" border=1>
    <tr><td height="50px">1</td></tr>
    <tr><td>2</td></tr>
    <tr><td height="50px">3</td></tr>
    </table>
    When shoved in an HTML doc by itself will produce a table that occupies the full height of the browser window, with a cell at the top and a cell at the bottom, both 50 pixels high. The middle cell will fill in the rest. All good and what I want.
    Then I add the XHTML 1.0 strict dtd...and it gets buggered. Any help?
    I am non-committal, feigning blasť.

  2.  

  3. #2
    Senior Member
    Join Date
    Apr 2002
    Location
    Cocooned in her thoughts
    Posts
    312
    Member #
    67
    Liked
    3 times
    The code does work ok. Can you show us the code after incorporating the XHTML?
    Don't look so frightened
    This is just a passing phase

    One of my bad days...

  4. #3
    Senior Member
    Join Date
    Mar 2002
    Location
    Warwick!
    Posts
    735
    Member #
    37
    Just add:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    to the top of it.
    I am non-committal, feigning blasť.

  5. #4
    Member Belledandy's Avatar
    Join Date
    Apr 2002
    Location
    Wales
    Posts
    89
    Member #
    78
    It works fine if you do it like this:

    Code:
    <head><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"></head>
    <table height="100%" border=1 width="49">
    <tr><td height="50px">1</td></tr>
    <tr>2</td></tr>
    <tr><td height="50px">3</td></tr>
    </table>

  6. #5
    Senior Member
    Join Date
    Mar 2002
    Location
    Warwick!
    Posts
    735
    Member #
    37
    The doctype shouldn't be in <head> tags...it should just be at the very top. Try it again and you'll see what I mean.
    I am non-committal, feigning blasť.

  7. #6
    Member Belledandy's Avatar
    Join Date
    Apr 2002
    Location
    Wales
    Posts
    89
    Member #
    78
    I know, the only way I can get it to work, is my moving it up into the head.

  8. #7
    Senior Member
    Join Date
    Apr 2002
    Location
    Cocooned in her thoughts
    Posts
    312
    Member #
    67
    Liked
    3 times
    Originally posted by Belledandy
    I know, the only way I can get it to work, is my moving it up into the head.
    golly belle! you're one smart woman
    Don't look so frightened
    This is just a passing phase

    One of my bad days...

  9. #8
    Senior Member
    Join Date
    Mar 2002
    Location
    Warwick!
    Posts
    735
    Member #
    37
    The doctype isn't read if it appears on the head...it has to go at the top.
    I am non-committal, feigning blasť.

  10. #9
    Junior Member
    Join Date
    Aug 2002
    Location
    Houston
    Posts
    10
    Member #
    173
    Yes, when you move the doctype away from the very top you trigger the browser into quirks mode, which allows sloppy coding and simulates older broswer behaviour.

    The reason your height=100% isn't working is because it isn't allowed as defined by the W3C XHTML specs. Run it through the validator and youíll see.

    As for a solution, Iím afraid one doesnít pop to mind off hand, but Iíll think about it.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:44 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com