how to change color of an Html.ActionLink

0
<div class="row">
@foreach(var comicBook in Model)
{
    <div class="col-md-3">
        <h4>@Html.ActionLink(comicBook.DisplayText, "Detail", new { id = comicBook.Id })</h4>
        <a href="@Url.Action("Detail", new { id = comicBook.Id})">
            <img src="/Images/@comicBook.CoverImageFileName"
                 alt="@comicBook.DisplayText"
                 class="img-responsive" />
        </a>
    </div>
}

    
asked by CeciPeque 03.07.2018 в 17:38
source

1 answer

0

Do the following:

Html.ActionLink("My Link", "MyAction", null, new { @class = "my-class" })

Then in CSS add the following or you can put it between <style> within your html

a.my-class { color: #333333 }
a.my-class:active { color: #666666 }
a.my-class:link { color: #999999 }
a.my-class:visited { color: #CCCCCC }
    
answered by 03.07.2018 в 17:46