92 users online (1 members and 91 guests)  


  Results 1 to 6 of 6

Related

  1. IE8 not rendering correct height    Forum: CSS Forum
    Replies: 2
  2. Height form paypal    Forum: CSS Forum
    Replies: 2
  3. dynamically changing height of a div    Forum: CSS Forum
    Replies: 3
  4. Table height issues in IE    Forum: HTML Forum
    Replies: 3
  5. CSS and img height & width    Forum: CSS Forum
    Replies: 1
  1. #1
    lisa's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2005
    Posts
    3

    IE div height query

    Hi

    First off, many thanks to the people on this site I've been learning a lot about CSS and the bugs etc. It's one thing reading the books, but getting good examples and feedback usually helps a lot.

    And therefore, I have a problem now of my own that's 'buggin' me (no pun intended).

    The following works fine on Firefox, however, the cells are completely screwed in IE (both on PC). Any help would be appreciated.

    <style type="text/css">
    <!--
    body, html {margin: 0px; height: 100%;}
    #stretchTable {
    margin: 0 auto;
    width: 600px;
    height: 100%;
    background-color: #996600;
    }
    .cell1 {
    background-color: #FF6666;
    height: 50px;
    }
    .cell2 {
    background-color: #CCCC33;
    height: 50px;
    }
    -->
    </style>
    </head>

    <body>
    <table border="0" cellspacing="0" cellpadding="0" id="stretchTable">
    <tr>
    <td class="cell1">&nbsp;</td>
    </tr>
    <tr>
    <td class="cell2">&nbsp;</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    </tr>
    </table>

    Essentially the cells render oddly in IE, but are perfect in Firefox.

    And thank you
    L

  2. #2
    ALL's Avatar
    Super Dooper Nerd

    Status
    Offline
    Join Date
    Feb 2005
    Location
    localhost
    Posts
    382

    Re: IE div height query

    can you provide a screenshot or somthing, because i dont have Fx on this computer, and i cant find how it looks "screwie" in IE

  3. #3
    lisa's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2005
    Posts
    3

    Re: IE div height query

    Hi thanks for the reply... here is the full code:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    body, html {margin: 0px; height: 100%;}
    #stretchTable {
    margin: 0 auto;
    width: 600px;
    height: 100%;
    background-color: #996600;
    }
    .cell1 {
    background-color: #FF6666;
    height: 50px;
    }
    .cell2 {
    background-color: #CCCC33;
    height: 50px;
    }
    -->
    </style>
    </head>

    <body>
    <table border="0" cellspacing="0" cellpadding="0" id="stretchTable">
    <tr>
    <td class="cell1">&nbsp;</td>
    </tr>
    <tr>
    <td class="cell2">&nbsp;</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    </tr>
    </table>
    </body>
    </html>


    And there's a screen grab here (IE6 left, FFox right: right is correct, left is 'screwy')
    http://www.rustgirl.plus.com/css-grab.jpg

    again, thank you

  4. #4
    ALL's Avatar
    Super Dooper Nerd

    Status
    Offline
    Join Date
    Feb 2005
    Location
    localhost
    Posts
    382

    Re: IE div height query

    you may find this really really wierd (as like i did), but the only problem was this line:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    when it comes to some of this stuff i know little about it, infact i dont know what that even does!

    it also doesnt put it in the center, but that is eassily fixed!

  5. #5
    lisa's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2005
    Posts
    3

    Re: IE div height query

    WT... you're correct, I don't get it. How can a doc type declaration screw with the div's!?

    Anyway, many thanks for the help. For now I'll remove the offending line, but if anyone can clarify why...? Or suggest a replacement, that would be cool

    Thank you
    L

  6. #6
    ALL's Avatar
    Super Dooper Nerd

    Status
    Offline
    Join Date
    Feb 2005
    Location
    localhost
    Posts
    382

    Re: IE div height query

    you could use this insted:
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    the version 4.01 and 4.0 are the actual thing that is screwing the entire thing up



Tags for this Thread