牛骨文教育服务平台(让学习变的简单)
博文笔记

防止div被里边的table撑大

创建时间:2015-10-30 投稿人: 浏览次数:1149
  1. <style type="text/css">  
  2. .tabWordBreak{table-layout:fixed;word-wrap:break-word;word-break:break-all;}  
  3. </style>  
[html] view plaincopy
  1. <table class="tabWordBreak" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>  
  2.     <div id="divContent" style="width: 100%;height: 165px;overflow: auto">  
  3.     </div>  
  4. </td></tr></table>





table里边套div,div里边再套table <table> <div> <table> </table> </div> </table>
style="table-layout:fixed;word-wrap:break-word;word-break;break-all;height: 400px;overflow: hidden;"

?被撑大的列加上

style="height: 300px;overflow: hidden;"

?

td中的div加上

style="height:300px;vertical-align:top; overflow:scroll; overflow-x:auto; overflow-y:auto;"

声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。