我可以在 HTML 表格中设置 <p class= "pull-right" ><td>吗?



我想在表中设置标题,标题名称在中间,序列号在右边。我该怎么设置??

这是我的示例代码:

<tr class="header"> 
    <td colspan="3"  >
     PAKET ALAT GELAS
     <p class="pull-right" style="font-size:11px;">NO. <?php echo $date ;?><p></td>
</tr>

这是我的风格:

table tr.header td {
    font-size:18px;
    height:30px;
    text-align:center;
    line-height:20%;
    margin: 10px auto;
    border: 1px solid black;
}

您可以对此进行检查。参见DEMO

别忘了检查

左侧的"外部资源"菜单。

样本代码:

<table class="table table-bordered">
<tr class="header"> 
    <td colspan="3" >
     PAKET ALAT GELAS
     <p class="pull-right" style="font-size:11px;">NO. 1<p></td>
</tr>
<tr class="header"> 
    <td colspan="3" >
     PAKET ALAT GELAS
     <p class="pull-right" style="font-size:11px;">NO. 2<p></td>
         <td colspan="3" >
     PAKET ALAT GELAS
     <p class="pull-right" style="font-size:11px;">NO. 3<p></td>
         <td colspan="3" >
     PAKET ALAT GELAS
     <p class="pull-right" style="font-size:11px;">NO. 4<p></td>
</tr>
</table>

最新更新