I’m trying to remove the text decoration from the following however text-decoration: none doesnt seem to work. Please could anyone give me some pointers?
<h1>The<br/>@Html.ActionLink("World Wide Web", "WWW", new { @class = "NameStyle" })</h1>
My CSS:
.NameStyle
{
text-decoration: none;
}
You are not using the correct overload of the ActionLink helper and thus you haven’t applied any CSS class to it.
Here’s the overload that you used:
and here’s the markup it generated:
I think you understand why this doesn’t work as you might expect it to work.
And here’s the correct overload that you should use:
which generates:
Now your
.NameStyleclass definition might actually be taken into account.