我怎么能给一个表,是在一个TD 100%的高度,即TD的全部高度



这是我的表的样子。当我尝试给表100%的高度,但它不工作。

我希望包含"xxx"的TD具有100%的高度,即父TD的高度。

</tr>
    <tr align="left">
        <td valign="top">
            <table style="height:100%" border="1">
                <tr>
                    <td>
                        <span title="Toggle between full screen and frames." id="showHideText"  onclick="showHideFrames();" 
                                class="buttonLabel" style="cursor:pointer; font-size:65%; font-weight:bold;">
                            Hide Frames
                        </span>
                    </td>
                </tr>
                <tr>
                    <td align="bottom" >
                        xxx
                    </td>
                </tr>
            </table>
        </td>

你想要这样的东西吗?

<table>
        <tr align="left" style="height: 1000px">
            <td valign="top">
                <table style="height: 100%" border="1">
                    <tr>
                        <td>
                            <span title="Toggle between full screen and frames." id="showHideText" onclick="showHideFrames();"
                                class="buttonLabel" style="cursor: pointer; font-size: 65%; font-weight: bold;">
                                Hide Frames </span>
                        </td>
                    </tr>
                    <tr>
                        <td valign="bottom" style="height: 1000px">
                            xxx
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>

设置CSS的height属性:

style="height:100%;"

最新更新