Here are some very basic examples of how to use the CustomStyle class. They give the style rule and the statement needed to create the style rule in a Web Content Form or Web Form:
To create the style rule:
.zeromarginpadding{margin:0px;padding:0px;}
Use one of the following statements:
Me.Page.Header.StyleSheet.CreateStyleRule(New CustomStyle("margin:0px;padding:0px;"),Nothing,".zeromarginpadding")
Me.Header.StyleSheet.CreateStyleRule(New CustomStyle("margin:0px;padding:0px;"),Nothing,".zeromarginpadding")
To create the style rule:
div{border-width:0px;width:100%;}
Use one of the following statements:
Me.Page.Header.StyleSheet.CreateStyleRule(New CustomStyle("border-width:0px;width:100%;"),Nothing,"div")
Me.Header.StyleSheet.CreateStyleRule(New CustomStyle("border-width:0px;width:100%;"),Nothing,"div")