How to change HTML table td width?

Zosillionieve

New Member
Here's my current code,\[code\]$(document).ready(function () { $(".stripeMe tr").mouseover(function () { $(this).addClass("over"); }).mouseout(function () { $(this).removeClass("over"); }); $(".stripeMe tr:even").addClass("alt");});<table class="stripeMe" width="100%"> <tr> <td style="width:85%">Product Name</td> <td style="width:5%; text-align:right">Price (each)</td> <td style="width:5%; text-align:center">Quantity</td> <td style="width:5%"></td> </tr> <% foreach (var cart in Model.Carts) { %> <tr id="row-<%: cart.RecordID %>"> <td> <%: Html.ActionLink(Model.pr.GetProduct(cart.ProductID).ProductName.Length > 52 ? (string)Model.pr.GetProduct(cart.ProductID).ProductName.Substring(0, 52) + "..." : (string)Model.pr.GetProduct(cart.ProductID).ProductName, "Elaborate", "Product", new { ProductID = cart.ProductID, RecordID = cart.RecordID }, null)%> </td> <td style="text-align:right"> <%: (string)String.Format("{0:F}",Model.pr.GetProduct(cart.ProductID).UnitPrice) %> </td> <td> <input type="text" disabled="disabled" style="text-align:center; border-width:0; background-color:transparent" id="column-Quantity-<%: cart.RecordID %>" value="http://stackoverflow.com/questions/14391092/<%: cart.Quantity %>"></input> </td> <td> <%: Ajax.ActionLink("Remove from Cart", "RemoveFromCart", new { RecordID = cart.RecordID }, new AjaxOptions {OnSuccess = "handleUpdate" })%> </td> </tr> <% } %> <tr> <td><hr />Total</td> <td align="right"> <hr /> <span id="cart-total"><%: (string)String.Format("{0:F}",Model.CartTotal) %></span> </td> <td align="center"> <hr /> <span id="cart-quantity"><%: Model.CartQuantity %></span> </td> <td><hr />&nbsp;</td> </tr> </table>\[/code\]No matter how I change it, it doesn't work. I'm using the latest version of Firefox.\[code\]<td style="width:85%">Product Name</td>\[/code\]
 
Back
Top