IE 7 issues: Super simple page - TD height not taking effect

Posted by Anthony on Stack Overflow See other posts from Stack Overflow or by Anthony
Published on 2012-03-23T05:25:51Z Indexed on 2012/03/23 5:29 UTC
Read the original article Hit count: 128

Filed under:
|
|

This is my markup:

<!DOCTYPE HTML>
<html>
    <head>
            <title>Test title</title>
            <style type="text/css">
                *
                {
                    margin:0px auto;
                    padding:0px;
                }
                html,body
                {
                    height:100%;
                    width:100%;
                }
            </style>
    </head>
    <body>
        <table cellspacing="0" cellpadding="0" style="width: 100%; height: 100%;">
            <tr>
                <td style="height:55px;background:#CCC;" valign="top">
                    <h1>Header</h1>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Content @RenderBody()
                </td>
            </tr>
            <tr>
                <td style="height:85px;background:#CCC;" valign="bottom">
                    Footer
                </td>
            </tr>
        </table>
    </body>
</html>

Can anybody tell me why td height is not taking effect? This same markup works in IE9. Is it due to the HTML5 doctype?

© Stack Overflow or respective owner

Related posts about html

Related posts about css