美好的一天!我想問一下怎樣才能讓我的桌子變成這樣? 使用DIVS創建表格?
這是我的代碼,但不幸的是我有邊界和行和單元格大小的問題。 #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;
}
提前感謝!
爲什麼你想複製一個表?我不確定任何一個應該在一個。如果是這樣,請將它放在桌子上。 – Rob
歷史上,桌子因各種原因被濫用和濫用。但是,如果您的數據是表格,那麼請使用表格 - 這就是它的用途! –