473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

asp.net 2.0 themes and css

If I am using themes for example on a label control, how do I also apply
css to the control? I have a number of label controls that I want to be
treated differently to my standard label controls by using an image for
their backgrounds.
Thanks,

Mike

*** Sent via Developersdex http://www.developersdex.com ***
Apr 4 '06 #1
7 1129
You can define multiple <asp:Label> tags in a skin file with different
SkinId s -- then you can specify the SkinID for any asp:Label on your
webpage

"Mike P" <mi*******@gmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
If I am using themes for example on a label control, how do I also apply
css to the control? I have a number of label controls that I want to be
treated differently to my standard label controls by using an image for
their backgrounds.
Thanks,

Mike

*** Sent via Developersdex http://www.developersdex.com ***

Apr 4 '06 #2
On Tue, 04 Apr 2006 08:59:44 -0700, Mike P wrote:
If I am using themes for example on a label control, how do I also apply
css to the control? I have a number of label controls that I want to be
treated differently to my standard label controls by using an image for
their backgrounds.


Set the CssClass property to whatever style you want to use.
Apr 4 '06 #3
WRONG
Themes over-ride class declarations. The class declaration would have to be
applied to the Skin.

<%= Clinton Gallagher

"Erik Funkenbusch" <er**@despam-funkenbusch.com> wrote in message
news:1j***************@funkenbusch.com...
On Tue, 04 Apr 2006 08:59:44 -0700, Mike P wrote:
If I am using themes for example on a label control, how do I also apply
css to the control? I have a number of label controls that I want to be
treated differently to my standard label controls by using an image for
their backgrounds.


Set the CssClass property to whatever style you want to use.

Apr 4 '06 #4
On Tue, 4 Apr 2006 14:03:00 -0500, clintonG wrote:
WRONG
Themes over-ride class declarations. The class declaration would have to be
applied to the Skin.


Perhaps I misunderstood, but I thought he was asking about applying a css
theme to a label control. If he means he's using a skin, then you're
correct.
Apr 4 '06 #5
Didn't mean to yell... %-)

<%= Clinton Gallagher

"Erik Funkenbusch" <er**@despam-funkenbusch.com> wrote in message
news:1c***************@funkenbusch.com...
On Tue, 4 Apr 2006 14:03:00 -0500, clintonG wrote:
WRONG
Themes over-ride class declarations. The class declaration would have to
be
applied to the Skin.


Perhaps I misunderstood, but I thought he was asking about applying a css
theme to a label control. If he means he's using a skin, then you're
correct.

Apr 5 '06 #6
Here is my skin that relates to the label :

<asp:Label runat="server" Forecolor="#000000" Font-Names="Verdana"
Font-Size="9pt"
Backcolor="Silver" Font-Bold="True" SkinID="Main"
CssClass="Heading" />

Here is my css for the CssClass :

..heading {background-image: url(../images/titlegray.jpg);
color: black;
font-weight:bold;
font-family:Verdana;}

And here is the aspx page that I want to apply it to :

<asp:Label ID="lblLogin" runat="server" SkinID="Main">
Login</asp:Label>
This doesn't apply the CssClass to the label. Can anybody tell me what
is wrong with my code?


*** Sent via Developersdex http://www.developersdex.com ***
Apr 5 '06 #7
css classnames are case sensitive and are prefixed in the stylesheet with a
'.'

so either
CssClass="Heading"
.Heading{ .. }

or
CssClass="heading"
.heading{ .. }

"Mike P" <mi*******@gmail.com> wrote in message
news:eV****************@TK2MSFTNGP04.phx.gbl...
Here is my skin that relates to the label :

<asp:Label runat="server" Forecolor="#000000" Font-Names="Verdana"
Font-Size="9pt"
Backcolor="Silver" Font-Bold="True" SkinID="Main"
CssClass="Heading" />

Here is my css for the CssClass :

heading {background-image: url(../images/titlegray.jpg);
color: black;
font-weight:bold;
font-family:Verdana;}

And here is the aspx page that I want to apply it to :

<asp:Label ID="lblLogin" runat="server" SkinID="Main">
Login</asp:Label>
This doesn't apply the CssClass to the label. Can anybody tell me what
is wrong with my code?


*** Sent via Developersdex http://www.developersdex.com ***

Apr 10 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Full Decent | last post by:
Hey again! In my quest to make proper use of OO PHP I would like to ask for a critique of the current method of doing themes in the Camera Life (http://fdcl.sf.net) software and see if an OO...
5
by: Jan Hyde | last post by:
I keep reading that there should be a couple of built in themes in the directory ...\Microsoft.NET\Framework\v2.x.xxxxx\ASP.NETClientFiles\Themes I've yet to see any machine with this 'Themes'...
3
by: johannblake | last post by:
I'm reading up on Themes and Master Pages in ASP.NET 2.0 but I cannot seem to understand what the difference between the two are. Do Master Pages essentially end up doing what Themes do? Is...
4
by: Sean | last post by:
My experience now working with master pages on and off for 6 months is that they can be very dangerous when working with themes. One example in particular is the changes I made to my banner menu...
6
by: Clinton Farleigh | last post by:
Hi, I was going to ask a question, but I think I've answered it so now I am going to rant about how crappy ASP.NET themes are instead. As I've indicated above, my problem today is with themes....
3
by: WT | last post by:
Hello, I need to list all available themes for a .NET app, is there any API in ..NET2 for this or should I explore the folder files using IO methods ? Thanks for indication CS
11
by: New Bee | last post by:
Hi, I have been looking at Themes and Skins today and now resonably understand how they work at a ground level. But I have a couple of questions. 1. ) StyleSheetTheme I dont understand...
2
by: mike | last post by:
Hi. I am having trouble grasping the concept of applying a consistent theme to an ASP.net website. I didn't used to like ASP because it was too hard to apply a theme from a common theme folder like...
1
by: archana | last post by:
Hi all, I have just using dot net studio 2005. I am careating one theme. Here global themse are getting stored at 2 location. \Microsoft.NET\Framework\<version>\ASP.NETClientFiles\Themes....
1
by: Cramer | last post by:
Using 3.5: Suppose I have defined 20+ themes (including multiple graphics, ..skin files, and css files per theme), and I want to make those themes *available* to all the Web sites on my Web server....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.