怎么让这两个div一样高?

这是这两个div的代码,我想让第二个div跟第一个一样高。。可是总是做不到,哪位高人有什么办法么?只能用style=

<div>
<div style="float: left; clear: left; width: 50%; height: 100%; background-color: rgb(34, 34, 34);">
<table border="0" style="text-align: left; border: 1px none;">
<tbody><tr>
<td style="background-color: rgb(170, 170, 170); font-size: 125%;"><b>FPS - 第一人称射击游戏</b>
</td></tr>
<tr>
<td style="background-color: rgb(34, 34, 34); color: rgb(238, 238, 238); font-size: 115%;">FPS是第一人称射击类游戏的简称(游戏专有名词)。 FPS(First-Person Shooter Game):第一人称射击游戏 严格来说FPS属于ACT类游戏的一个分支,但和RTS类游戏一样,由于其在世界上的迅速风靡,使之展成了一个单独的类型。
</td></tr></tbody></table>
</div>
<div style="float: right; clear: right; width: 50%; height: 100%; background-color: rgb(34, 34, 34);">
<table border="0">
<tbody><tr>
<td style="background-color: rgb(170, 170, 170); font-size: 125%;"><b>TPS - 第三人称射击游戏</b>
</td></tr>
<tr>
<td style="background-color: rgb(34, 34, 34); color: rgb(238, 238, 238); font-size: 115%;">第三人称射击类游戏,简称TPS(Third Personal Shooting Game),指游戏者可以通过游戏画面观察到自己操作的人物,进行射击对战的游戏。
</td></tr></tbody></table>
</div>
<div style="clear: both;"></div>
</div>

第1个回答  2011-07-27
style="margin-bottom:-9999px;padding-bottom:9999px;"

给两个都加上。然后上一级超出隐藏 style="overflow:hidden"追问

隐藏不了= =

第2个回答  2011-07-27
你高设100%那就是div中的内容撑高度额,设个具体值不行吗?追问

具体数字的话。。如果屏幕大小有变动呢?

第3个回答  2011-07-27
<td style="background-color: rgb(34, 34, 34); color: rgb(238, 238, 238); font-size: 115%;padding-bottom:40px;">第三人称射击类游戏,简称TPS(Third Personal Shooting Game),指游戏者可以通过游戏画面观察到自己操作的人物,进行射击对战的游戏。
</td></tr></tbody></table>

在style里加上padding-bottom:40px;就可以了追问

- -还是不行,不过还是谢谢了,我用Table解决了

本回答被提问者采纳
相似回答
大家正在搜