B
Bob
Hi,
i'm testing the order of application when it comes to styling with skin and
CSS files and i come to contradiction between what i get and what i read
about theme and CSS.
I wrote that StylesheetTheme will be overruled by everything else (CSS,
element styles and theme), but it's not the case in my example..
the red.css contains this:
..red
{
color:Red;
}
1) the aspx file:
--------------
<head runat="server">
<link href="App_Themes/mytheme/red.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<asp:Label ID="Label1" runat="server" CssClass="red"
Text="Label"></asp:Label>
</form>
</body>
This works: 'label' is red.
2) Now with StyleSheetTheme:
In directory 'mytheme' there is a file green.skin which contains:
<asp:Label SkinID="lightgreen" runat="server" Text="label"
ForeColor="lightgreen" ></asp:Label>
<asp:Label runat="server" Text="label" ForeColor="green" ></asp:Label>
The aspx file:
------------
<%@ Page Language="VB" StylesheetTheme="mytheme" AutoEventWireup="false"
CodeFile="Default2.aspx.vb" Inherits="Default2" %>
<head runat="server"></head>
<body>
<form id="form1" runat="server">
<asp:Label ID="Label1" runat="server" CssClass="red"
Text="Label"></asp:Label>
</form>
</body>
Now i expect that 'label' is red, but no: 'label' is green
Do i do sometyhing wrong or is the StyleSheetTheme not overruled by CSS?
Thanks
Bob
i'm testing the order of application when it comes to styling with skin and
CSS files and i come to contradiction between what i get and what i read
about theme and CSS.
I wrote that StylesheetTheme will be overruled by everything else (CSS,
element styles and theme), but it's not the case in my example..
the red.css contains this:
..red
{
color:Red;
}
1) the aspx file:
--------------
<head runat="server">
<link href="App_Themes/mytheme/red.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<asp:Label ID="Label1" runat="server" CssClass="red"
Text="Label"></asp:Label>
</form>
</body>
This works: 'label' is red.
2) Now with StyleSheetTheme:
In directory 'mytheme' there is a file green.skin which contains:
<asp:Label SkinID="lightgreen" runat="server" Text="label"
ForeColor="lightgreen" ></asp:Label>
<asp:Label runat="server" Text="label" ForeColor="green" ></asp:Label>
The aspx file:
------------
<%@ Page Language="VB" StylesheetTheme="mytheme" AutoEventWireup="false"
CodeFile="Default2.aspx.vb" Inherits="Default2" %>
<head runat="server"></head>
<body>
<form id="form1" runat="server">
<asp:Label ID="Label1" runat="server" CssClass="red"
Text="Label"></asp:Label>
</form>
</body>
Now i expect that 'label' is red, but no: 'label' is green
Do i do sometyhing wrong or is the StyleSheetTheme not overruled by CSS?
Thanks
Bob