这是我的代码,但不幸的是我遇到了边框,行和单元格大小的问题。 #DIVception。提前谢谢!
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="div.css">
</head>
<div class="table">
<div class="rTable">
<div class="rTableRow">
<div class="rTableHead"><strong>Request:</strong></div>
<div class="rTableHead"><strong>Processing</strong></div>
<div class="rTableHead"><strong>Job Name:</strong></div>
<div class="rTableHead"><strong>Anthem Inventory</strong></div>
</div>
</div>
<div class="rTableMessage">
<p>
Hi,
Files successfully loaded. You may now verify at your end.
If feed files have fallouts, reason for fallouts can be seen in
the error message of the file. You may edit/update your file so
that the other fallouts can be processed by the job.
Note:
All updated files sent to the server will update the existing
stored records. Hence, there will be no reloading of the
previous files.
Please see details below:
</p>
</div>
<div class="rTableDetails">
<div class="rTableRow">
<div class="rTableFallouts"><strong>Fallouts:</strong></div>
<div class="rTableHead">Check attachment</div>
</div>
</div>
<div class="rTableDetails">
<div class="rTableRow">
<div class="rTableLink"><strong>Link:</strong></div>
<div class="rTableHead">Check attachment</div>
</div>
</div>
<div class="rTableDetails">
<div class="rTableRow">
<div class="rTableBlank"></div>
<div class="rTableBlank2"></div>
</div>
</div>
<div class="rTableDetails">
<div class="rTableRow">
<div class="rTableLink"><strong>Details:</strong></div>
<div class="rTableProcess">Processed @ 5:40 PM</div>
</div>
</div>
</div>
</html>
这是我的css代码:
.table {
width: 100%;
height: 100%;
border-style: solid;
border-width: 1px;
}
.rTable {
display: table;
width: 100%;
}
.rTableRow {
display: table-row;
}
.rTableMessage {
padding-right: 20px;
padding-left: 20px;
padding-bottom: 20px;
padding-top: 20px;
}
.rTableHead {
display: table-cell;
padding: 3px 10px;
border: 1px solid #999999;
}
.rTableDetails {
display: table;
width: 100%;
}
.rTableFallouts, .rTableLink {
display: table-cell;
border: 1px solid #999999;
width: 120px;
}
.rTableBlank {
display: table-cell;
border: 1px solid #999999;
width: 120px;
height: 25px;
background-color: gray;
}
.rTableBlank2 {
display: table-cell;
border: 1px solid #999999;
width: auto;
height: 25px;
background-color: gray;
}
.rDetails {
height: auto;
border: 1px solid #999999;
}
提前致谢!
答案 0 :(得分:0)
如果您尝试溢出:隐藏;在.table中,它应该解决你的问题
答案 1 :(得分:0)
<table>
代码而不是<div>
?使用<table>
,您可以按照您希望的方式格式化表格。
注意:强>
如果您想在UI上向我们展示,最好使用jsfiddle
向我们展示。在这种情况下,我们可以轻松地看到问题并解决它在jsfiddle上提供代码。
答案 2 :(得分:0)