views:

38

answers:

1

I have an element that I'm trying to style:

<tr runat="server" id="row" >
...
</tr>

And I set the style programmatically:

row.Attributes("style") = "background: #cccccc;"

I get this output:

<tr id="SearchResults_myRepeaterPlain_ctl04_row" style="background: rgb(204, 204, 204) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">

Where is all that additional style information coming from, and How can I stop it?

+3  A: 

My hunch is because you're only using background. It's adding all the other values for background. Try using background-color:

BStruthers
+1, see the documentation for the CSS background property: http://www.w3schools.com/css/pr_background.asp.
Jeff Sternal
Switching to background-color did, in fact, fix the issue.
Sean McMillan