[英]Different table type in C# ASP.NET webform
我正在嘗試將表格添加到我的Web表單。 當我嘗試設置要在解決方案資源管理器中顯示的表格單元格的屬性時,我在書本練習中沒有看到Valign Property
。 我看到以“ aria”開頭的屬性。 我使用的表格類型錯誤嗎?
有人請指導我。
valign是無效的HTML5,已棄用。 改用CSS並使用
vertical-align:alignment (top, bottom, middle)
代替。
HTML方式:
<table>
<tr>
<td style="vertical-align:middle;">Vertically centered text</td>
<td style="vertical-align:top;">Vertically top aligned text</td>
</tr>
</table>
ASP.NET WebForms的方式:
<asp:Table id="myTable" runat="server">
<asp:TableRow>
<asp:TableCell VerticalAlign="Middle">
Vertically centered text
</asp:TableCell>
<asp:TableCell VerticalAlign="Top">
Vertically top aligned text
</asp:TableCell>
</asp:TableRow>
</asp:Table>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.