Reputation: 633
I want to have many horizontal rules with the same formating.
I'm trying with CssClass and got an error:
<hr CssClass="hRules"/> // error: Attribute 'CssClass' is not a valid attribute of element 'hr'.
What is the solution, please ?
Upvotes: 0
Views: 413
Reputation: 1120
For normal HTML controls, you must use the class
attribute. The CssClass
attribute is used for asp controls. You could probably still use the CssClass
attribute for your hr
control, but you would probably have to set it a runat="server"
too
Upvotes: 1
Reputation: 10124
Can you not simply use the class attribute?
<hr class="hRules" />
And in Css somewhere:
.hRules{
height:1px;
color:#C7C7C7;
}
Upvotes: 1