将 div 标签替换为 table
Replace a div tag with table
我需要用 table 标签替换 div 标签。我选择 table 标签,因为我个人更容易编辑和更新网站
这是 div 代码及其 CSS。如何将其替换为 Table 标签而不是此给定代码上的 div 标签:
代码:
<div class="cont-grid">
<div class="cont-grid-info">
<h3>Tittle</h3>
<p>Hellow World<br/>
<h3><b>FName,
LastName
,FathersName</b>
</h3>
</p>
</div>
</div>
CSS 样式
.cont-grid-info{
float:right;
width: 69.5%;
.cont-grid-info h3{
font-family: 'PT Sans Narrow', sans-serif;
font-size: 1.8em;
}
.cont-grid{
margin-left:auto;
margin-right:auto;
如果你愿意这样做:
<table>
<tr>
<th>FName</th>
<th>LastName</th>
<th>FathersName</th>
</tr>
<tr>
<th>the input name</th>
<th>the input lastaname</th>
<th>the input fathersname</th>
</tr>
<tr>
.. so on on the other imputs
</tr>
</table>
<div class="cont-grid">
<table class="cont-grid-info">
<tr>
<th>
Tittle
</th>
<th>
Tittle
</th>
<th>
Tittle
</th>
<th>
Tittle
</th>
</tr>
<tr>
<td>
Hellow World
</td>
<td>
FName
</td>
<td>
LastName
</td>
<td>
FathersName
</td>
<tr>
</div>
我需要用 table 标签替换 div 标签。我选择 table 标签,因为我个人更容易编辑和更新网站 这是 div 代码及其 CSS。如何将其替换为 Table 标签而不是此给定代码上的 div 标签:
代码:
<div class="cont-grid">
<div class="cont-grid-info">
<h3>Tittle</h3>
<p>Hellow World<br/>
<h3><b>FName,
LastName
,FathersName</b>
</h3>
</p>
</div>
</div>
CSS 样式
.cont-grid-info{
float:right;
width: 69.5%;
.cont-grid-info h3{
font-family: 'PT Sans Narrow', sans-serif;
font-size: 1.8em;
}
.cont-grid{
margin-left:auto;
margin-right:auto;
如果你愿意这样做:
<table>
<tr>
<th>FName</th>
<th>LastName</th>
<th>FathersName</th>
</tr>
<tr>
<th>the input name</th>
<th>the input lastaname</th>
<th>the input fathersname</th>
</tr>
<tr>
.. so on on the other imputs
</tr>
</table>
<div class="cont-grid">
<table class="cont-grid-info">
<tr>
<th>
Tittle
</th>
<th>
Tittle
</th>
<th>
Tittle
</th>
<th>
Tittle
</th>
</tr>
<tr>
<td>
Hellow World
</td>
<td>
FName
</td>
<td>
LastName
</td>
<td>
FathersName
</td>
<tr>
</div>