3
我有WEBGRID
有9列,在这我需要text-align Right
为Money字段和text-align center
为其他字段。当我尝试对齐列时,它被对齐,并且header
没有正确对齐,如何根据列对齐来对齐特定Column
的标头。asp.net mvc如何在网格上对齐标题mvc
<div id="gridContent">
@grid.GetHtml(
tableStyle: "webgrid-table",
headerStyle: "webgrid-header",
footerStyle: "webgrid-footer",
alternatingRowStyle: "webgrid-alternating-row",
selectedRowStyle: "webgrid-selected-row",
rowStyle: "webgrid-row-style",
columns: grid.Columns(
grid.Column("Cust_Name", "Customer Name", style:"Custname"),
grid.Column("SalesDatestr", "Sales Date",style: "name"),
grid.Column("TotalAmount", "Total Amount", style:"Curency"),
grid.Column("Pay_Amount", "Paid Amount", style:" width: 64px; text-align: right; margin-right: 174px; border-right-style: solid; border-right-width: 29px; "),
grid.Column("Pay_Mode", "Paid Mode", style: "name"),
grid.Column("Bank_Name", "Bank Name", style: "name"),
grid.Column("Bank_Address", "Bank Address", style: "name"),
grid.Column("ChequeNo", "ChequeNo", style: "name"),
grid.Column("Cheque_Datestr", "Cheque Date", style: "name")
)
)
</div>
风格:
部首
.webgrid-header td, th
{
background-color: #72AAD3; /*#D3D3D3; color: #6D70B5;*/
padding-bottom: 4px;
padding-top: 5px;
text-align: left;
border-bottom: 1px solid white;
border-top: 1px solid white;
margin-bottom: 2px;
padding: 0px 5px;
text-align: right;
height: 22px;
color: white;
font-weight: bold;
}
柱
.Curency
{
text-align: right;
width: 80px;
border: rgba(250, 38, 38, 0);
border-right-style: solid;
border-right-width: 10px;
}