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_Theme s/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="lightgr een" runat="server" Text="label"
ForeColor="ligh tgreen" ></asp:Label>
<asp:Label runat="server" Text="label" ForeColor="gree n" ></asp:Label>
The aspx file:
------------
<%@ Page Language="VB" StylesheetTheme ="mytheme" AutoEventWireup ="false"
CodeFile="Defau lt2.aspx.vb" Inherits="Defau lt2" %>
<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 3 1891
Hello,
Local CSS settings override StylesheetTheme - this is by design.
"Bob" wrote:
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_Theme s/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="lightgr een" runat="server" Text="label"
ForeColor="ligh tgreen" ></asp:Label>
<asp:Label runat="server" Text="label" ForeColor="gree n" ></asp:Label>
The aspx file:
------------
<%@ Page Language="VB" StylesheetTheme ="mytheme" AutoEventWireup ="false"
CodeFile="Defau lt2.aspx.vb" Inherits="Defau lt2" %>
<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
Yes, thanks, that's what i think.
But why does it not work here?
"Siva M" <sh******@onlin e.excite.comsch reef in bericht
news:20******** *************** ***********@mic rosoft.com...
Hello,
Local CSS settings override StylesheetTheme - this is by design.
"Bob" wrote:
>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_Theme s/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="lightgr een" runat="server" Text="label" ForeColor="lig htgreen" ></asp:Label> <asp:Label runat="server" Text="label" ForeColor="gree n" ></asp:Label>
The aspx file: ------------ <%@ Page Language="VB" StylesheetTheme ="mytheme" AutoEventWireup ="false" CodeFile="Defa ult2.aspx.vb" Inherits="Defau lt2" %>
<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
Hi,
Style-related control properties, theme and stylesheet theme settings are
rendered as inline styles using the style attribute of HTML elements. And the
CssClass property is rendered using the class attibute. Between class and
style, style takes priority.
Given this, the skin setting with green label color (the one without skin
ID) takes precedence over the CSS class "red" because the green skin is
applied using style attribute.
The order of precedence is: (1) Theme (2) Inline control settings (3)
Stylesheet Theme
Hope this clarifies?
"Bob" wrote:
Yes, thanks, that's what i think.
But why does it not work here?
"Siva M" <sh******@onlin e.excite.comsch reef in bericht
news:20******** *************** ***********@mic rosoft.com...
Hello,
Local CSS settings override StylesheetTheme - this is by design.
"Bob" wrote:
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_Theme s/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="lightgr een" runat="server" Text="label"
ForeColor="ligh tgreen" ></asp:Label>
<asp:Label runat="server" Text="label" ForeColor="gree n" ></asp:Label>
The aspx file:
------------
<%@ Page Language="VB" StylesheetTheme ="mytheme" AutoEventWireup ="false"
CodeFile="Defau lt2.aspx.vb" Inherits="Defau lt2" %>
<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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Quinton |
last post by:
I'm running a website that uses CSS to format the text and a CGI
program Coranto that icludes news updates via SSI. My problem is that
some parts of the CSS don't seem to take effect on the included news.
All four link styles are used, and all four work in the included text
files. The text styles, on the other hand, seem not to work at all.
The text that's part of the actual HTML file is formated according to
the CSS codes. However, the...
|
by: dan.vendel |
last post by:
Hi,
I know nothing about javascript, but quite a lot about regulat html and
CSS.
Have bumped into a problem that people in this fine congregation
perhaps can help me with.
I'm making a webshop. When user eventually ends up at the credit card
processor's secure pages, the styles are quite different from the
actual site's. I have managed to change some basics through a control
|
by: JezB |
last post by:
What's the generally accepted approach for using Styles and Stylesheets in a
web application based on .aspx files, Web Controls, User Controls, and
code-behind modules (c# in my case)? Most style and stylesheet guides on the
internet seem to be based on web sites (rather than applications) based on
relatively static textual information.
I have read that external stylesheet files are the way to go, but it seems
to me that these only lend...
|
by: Jéjé |
last post by:
Hi,
I have a web site with 3 themes.
once the site is compiled I changing the stylesheetTheme option in the
web.config has no effect!!!!!
I continue to see the theme used at the compilation time instead of the
requested theme.
what's appends?????
|
by: spolsky |
last post by:
hi,
it is possible to apply multiple styles as shown in the following
example.
<STYLE TYPE="text/css"><!--
BODY { background-color:salmon; }
P { margin-left:20px; }
.clsCode { font-family:"Comic Sans MS"; font-size:10pt; color:navy;}
| |
by: Rolf Welskes |
last post by:
Hello,
I set in the configuration file of the application:
<system.web>
<pages styleSheetTheme="E01_Theme01" />
......
This works.
|
by: shapper |
last post by:
Hello,
How can I apply a StyleSheetTheme to a page at runtime?
My Default.aspx.vb code is as follows:
1 Partial Class _Default
2 Inherits Config
3 ...
|
by: =?Utf-8?B?TWlrZQ==?= |
last post by:
Hi. I'm trying to programatically set a StyleSheetTheme for a web user
control. I understand that in order to use the Page.StyleSheetTheme property
I must override the base class property.
But since I'm doing this in a user control I'm getting the error: "property
'StyleSheetTheme' cannot be declared overrides because it does not override a
property in the base class".
I think this is because the web user control is inherits...
|
by: Marc |
last post by:
I am studying a bit and I have encountered some reading stuff about skin
files, css files and themes in asp.net.
To me the name of the StyleSheetTheme page attribute has little a no
connection with CSS files, StyleSheets. It's a level of precedence lower
then the page attribute 'Theme'. Both attributes refer to the name of a
Theme folder that contains skins and css files. But 'StyleSheetTheme' could
iqually be named something like...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |