我需要用表标签替换div标签。我选择表格标签会让我个人更容易进行网站编辑和更新 这是带有CSS的div代码。如何在给定代码上将其替换为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;
答案 0 :(得分:0)
如果您愿意这样做:
<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>
答案 1 :(得分:0)
<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>