Html 表格对齐=中心| |右侧,差异在<;br/>;
在asp.net中,我创建了一个表:Html 表格对齐=中心| |右侧,差异在<;br/>;,html,css,asp.net,asp.net-mvc-3,html-table,Html,Css,Asp.net,Asp.net Mvc 3,Html Table,在asp.net中,我创建了一个表: <table border="1" align="right" class="detailstable StartOnNewPage"> <tr> <td style="text-align:left; width:100px;">Miscellaneous</td> <th style=
<table border="1" align="right" class="detailstable StartOnNewPage">
<tr>
<td style="text-align:left; width:100px;">Miscellaneous</td>
<th style="text-align:right; width:100px" class="FadeOutOnEdit"><%: this.FormatMoney(MiscellaneousItemsTotal) %></th>
</tr>
<tr>
<th style="text-align:right; width:100px;"><%: this.DisplayMiscellaneousPercentage%></th>
<td style="text-align:right; width:100px;"><%: this.MiscellaneousToDisplayWithTwoDecimalPlaces%></td>
</tr>
<tr>
<th style="text-align:left; width:100px;">TOTAL</th>
<th style="text-align:right; width:100px;"><%: this.FormatMoney(TotalOfAll)%></th>
</tr>
</table>
<br />
<br />
<br />
混杂的
全部的
如果表格的对齐设置为“右”,它不会拾取3
,但是如果我将表格设置为align=“center”,它会拾取……关于为什么会这样做,您有什么想法吗
通常,HTML表前后都会有一个中断。这个
align属性允许其他HTML元素环绕表
因此,使用“右对齐”时,打断实际上位于表的左侧
“对齐”属性现在为空,因此不应使用
将您的表格样式,包括为td和th硬编码的所有样式,放入您的css文件。正如@Joe R所说的那样,我建议您使用
边距底部:10px代码>用于此目的。为什么要三个换行符?那张桌子上的页边距底部如何?我刚试过,但没有任何改变??检查这一页边距:“底部”与“对齐:居中”和“对齐:右侧”一起工作