Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE not expanding with height 100%

Status
Not open for further replies.

RTomes

Programmer
Apr 19, 2005
357
US
Noticed this with IE 6.0 the other day. The cells don't seem to grow and expand correctly anymore. Is this some thing new or something I never noticed.
In sample below the red side of the table should be the same height as the blue side. It displays correctly in Firefox but in IE the red side will not grow with the large content on the right. Any work arounds for this?


Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] >
<head>
    <title>Untitled Page</title>
</head>
<body>
    <table height="100%" cellpadding="0" cellspacing="0" >
        <tr height="100%">
            <td width="200">
               <table height="100%" width="100%" cellpadding="0" cellspacing="0" >
                    <tr height="100%" >
                        <td bgcolor="red" >Red</td>
                    </tr>
               </table> 
            </td>
            <td bgcolor="blue">
                <div style="height:2000px" >Blue</div>
            </td>
        </tr>
    </table>
</body>
</html>
 


This seems to work. I would stay away from using many dynamic properties on one page, they can slow down IE.
Would still like to know if this is some new issue.

Code:
<table  height="100%" style="height:expression(this.parentNode.offsetHeight)"  id="tbl"  width="100%" cellpadding="0" cellspacing="0" >
                    <tr height="100%" >
                        <td bgcolor="red" >Red</td>
                    </tr>
               </table>
 
Nevermind that last post. Stay away from dynamic css properties. That last solution just locked up IE.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top