newbie: can this be put into a css file?


J

Jeff

Dear reader!

Below is the source of a asp.net 2.0 menu. I wonder if it's possible to put
styles like <StaticSelectedStyle ForeColor="blue" /> into a css file? and if
it's possible, how? A link explaining this would be greatly welcome!

Or maybe it's better to put it into .skin files?

Best Regards

Jeff


<asp:Menu ID="Menu1" runat="server" BackColor="#F7F6F3"
DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="0.8em"
ForeColor="#7C6F57" StaticSubMenuIndent="10px">
<StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
<DynamicHoverStyle BackColor="yellow" ForeColor="White" />
<DynamicMenuStyle BackColor="blue" />
<StaticSelectedStyle BackColor="red" />
<StaticSelectedStyle ForeColor="blue" />
<DynamicSelectedStyle BackColor="blue" />
<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
<Items>
<asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
<asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
<asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
<asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem>
</Items>
<StaticHoverStyle BackColor="#7C6F57" ForeColor="White" />
</asp:Menu>
 
Ad

Advertisements

G

Guest

You cannot put Style information into a CSS file or <style> element in the
form that you show because it is illegal CSS syntax.

When you use these elements in a declarative control definition, it uses
these on the server to CREATE the legal css that they define. If you want to
see what this css looks like, just view source on any page that has a control
with such definitions.
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top