我有一个关于 HTML 表格的问题。我使用 Divs 创建了 HTML 表格。一些单元格包含图像,因此它们具有固定大小。底部单元格可根据其他框中填写的数据调整大小。所以,我不想在这个溶液中使用绝对选项。这是我的代码:
<!DOCTYPE html>
<html>
<header>
<style type="text/css">
object
{
outline: none;
display:block;
}
html, body {
margin:0; padding:0;
height:100%;
}
.divTable
{
width: 135px;
height: 100%;
display: table;
float:left;
background-color:blue;
}
.newDiv{
position: relative;
left:135px;
height:100%;
width:100%;
display: block;
background-color:yellow;
border:1px solid #BBBDBF;
border-left:0px;
}
.divTableRow
{
width: 135px;
height: 30px;
display: table-row;
}
.divTableCell
{
width: 135px;
height: 30px;
background: white url('Images/bottom_up.png') 0 0 no-repeat;
display: table-cell;
text-align:center;
vertical-align:middle;
}
.divTableTopCell
{
width: 135px;
height: 30px;
background: white url('Images/top_up.png') 0 0 no-repeat;
display: table-cell;
text-align: center;
border-bottom:1px solid #848385;
vertical-align:middle;
}
.divTableBottomBox
{
position:relative;
width: 133px;
height: 100%;
background-color: #d0d2d3;
display: block;
border:1px solid #BBBDBF;
clear:both;
}
.divParent{
position: relative;
display:block;
min-height:700px;
min-width:700px;
}
</style>
</header>
<body>
<div class='divParent'>
<div class="divTable">
<div class="divTableRow">
<div id = 'accountDetails' class="divTableTopCell">
Account Details
</div>
</div>
<div class="divTableRow">
<div id = 'locations' class="divTableCell">
Locations
</div>
</div>
<div class="divTableRow">
<div id = 'users' class="divTableCell">
Users
</div>
</div>
<div class="divTableRow">
<div id = 'training' class="divTableCell">
Training
</div>
</div>
<div class="divTableRow">
<div id = 'contracts' class="divTableCell">
Contracts
</div>
</div>
<div class='divTableBottomBox'>
</div>
</div>
<div class='newDiv'>
Helllo <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
</div>
</div>
</body>
</html>
任何帮助,将不胜感激。