如何控制Firefox中表格单元格的溢出?

jla*_*i79 4 html css firefox html-table

我有一个表,并希望第一列有一个垂直滚动条.这适用于Chrome,IE9,iPad上的Safari但不适用于Firefox?为什么不?我究竟做错了什么?

HTML:

    <table>
        <tbody>
            <tr>
                <td class="col1">
                    <div class="wrapper">
                        <p>Test</p>
                        <p>Test</p>
                        <p>Test</p>
                        <p>Test</p>
                        <p>Test</p>
                        <p>Test</p>
                        ...
                    </div>
                </td>
                <td class="col2">
                </td>
            </tr>
        </tbody>
    </table>
Run Code Online (Sandbox Code Playgroud)

CSS:

html, body {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
}

table {
width: 100%;
height: 100%;
}

table .col1 {
width: 20%;
height: 100%;
}

table .col1>div.wrapper {
width: 100%;
height: 100%;
overflow: auto; 
}

table .col2 {
width: 80%;
height: 100%;
background-color: red;
}
Run Code Online (Sandbox Code Playgroud)

ATO*_*TOA 5

问题:

overflow:scroll;不会在里面工作table.

如果你对a做同样的事情div,那么它会正常工作.

请参阅实例

例:

HTML

<div class="col1" >
    <div class="wrapper">
        <p>Test</p>
        <p>Test</p>
        <p>Test</p>
        <p>Test</p>
        <p>Test</p>
    ...
    </div>
</div><div class="col2">
</div>
Run Code Online (Sandbox Code Playgroud)

更多内容:http://lists.w3.org/Archives/Public/www-style/2006Mar/0030.html#replies

感谢kirtan