Alex Rivera | Logout

Asp.Net-MVC: How to style <%=Html.ActionLink()%> with Css?

Asked 2010-02-11T12:28:05.673
10

Here's a piece of my HTML code

<div id = "mydiv">
    <% = Html.ActionLink("Some Text","SomeAction")%>
</div>

I'd like to style it in white so that it doesn't conflict with the background, which is also blue. So I did this:

#mydiv {background-color:blue;} 
#mydiv a:link { color:white}

But, it doesn't work -- the color it's still blue. How can I do it? Maybe, I just did not write well the selectors.

Thanks for helping.

Edit
Report

1 Answer

1

Try:

#mydiv a { color:white}

Also, try remove the whitespace around your Id attribute (just in case): ->

answered 2010-02-11T12:32:49.223

Your Answer