【发布时间】:2014-03-27 15:50:13
【问题描述】:
我试图对齐或将此 HTML 放在同一行
实际输出是这样的
Cart:
Payment >>
Add another item >>
Product Price Quantity
Toaster 19.99 1 Update Cart
Remove from Cart <== I want this column align with
the update cart or on the same
line
Total 19.99
我希望更新购物车和删除在不同的行但对齐 或者让它们在同一行
这里是 Index.cshtml
@{int ix = 0;}
@foreach (var item in Model.CartItems)
{
<tr id="row-@item.ProductId">
<td>
@Html.ActionLink(item.Produit.Description, "Details", "Product", new { id =
item.ProduitId }, null)
</td>
<td>
@item.Product.Price
</td>
<td>
@Html.TextBoxFor(model => model.CartItems[ix].Quantity,
new {style = "width:30px; text-align:right;",
onkeyup = "clearUpdateMessage();",
onchange = "clearUpdateMessage();"
})
</td>
<td>
<a href="#" class="RefreshQuantity" data-id="@item.PanierId"
id="CartItems_@(ix)__Quantity"> Update Cart >> <a />
</td>
<td>
<a href="#" class="RemoveLink" data-id="@item.PanierId"> Remove from Cart >>
</a>
</td>
</tr>
ix++;
}
【问题讨论】:
标签: html asp.net-mvc-4 c#-4.0