开发者

Force DIV full height within table TD

开发者 https://www.devze.com 2023-03-12 04:05 出处:网络
I got this: <style> .topdiv { vertical-align:top } .bottomdiv { vertical-align:bottom } </style> <table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">

I got this:

<style>
.topdiv {
    vertical-align:top
}
.bottomdiv {
    vertical-align:bottom
}
</style>

<table border="1" cellspacing="0" cellpadding="0">
    <tr>
        <td>
            content<br/>
            content<br/>
            content<br/>
            content<br/>
            This cell holds content that is higher than t开发者_开发百科he right side<br/>
            content<br/>
            content<br/>
            content<br/>
            content
        </td>
        <td>
            <div class="containerdiv">
                <div class="topdiv">
                    I want this DIV at the top of the cell
                </div>
                <div class="centerdiv">
                    I want this DIV in the middle of the cell
                </div>
                <div class="bottomdiv">
                    I want this DIV at the bottom of the cell
                </div>
            </div>
        </td>
    </tr>
</table>

I hope the text explains my problem well enough :)


First of all, it is a bad idea to have table layouts in 2011, let alone mix table and div layouts!

I feel it is far simpler to do this in a div-only layout than this one.

0

精彩评论

暂无评论...
验证码 换一张
取 消