I trying to align or to put on the same line this HTML如何對齊兩個欄一起在一個<a tag
Actual output looks like this
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
I will like to have the Update Cart and Remove on different line but align or have them on the same line
Here is the Index.cshtml
@{int ix = 0;}
@foreach (var item in Model.CartItems)
{
<tr id="[email protected]">
<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="[email protected](ix)__Quantity"> Update Cart >> <a />
</td>
<td>
<a href="#" class="RemoveLink" data-id="@item.PanierId"> Remove from Cart >>
</a>
</td>
</tr>
ix++;
}
你能提供給我一個例子用%您指媒體? – user3127986
我把我的輸出佈局(請參閱我對問題的描述)我試圖在每一個寬度:100像素,但它出來完全像我說的描述 – user3127986
嘗試減小像素大小,看看你是否得到不同的結果。 – Robert