user3474488 user3474488 - 2 months ago 9x
ASP.NET (C#) Question

Change the CSS of the first Argument of @Ajax.ActionLink

is there a way to change the CSS style of only the First argument "Add To Cart" ?
example changing font or color of the Text?

@Ajax.ActionLink( "Add To Cart", "addToCart", "Product", new { idProduct = @item.idProduct, quantity = 1 }, new AjaxOptions { HttpMethod = "POST", }, new { @class = "item-add-btn" } )


Perhaps using pseudo-class in css, first-of-type or first-child. see example

li:first-of-type {
  background-color: yellow;

li:first-child {
  background-color: yellow;

CSS3 :first-of-type Selector