473,386 Members | 1,775 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,386 software developers and data experts.

2.0 Themes = Big Fat Humongous Pages

Ever tried looking at the source? Holy Mackerel.
Is there some strategy to use CSS with Themes that does not result in the
framework generating inline styles for every HTML element of the page?
I haven't used a StyleSheetTheme yet. What does it do "in this context?"

<%= Clinton Gallagher
Mar 28 '06 #1
4 1147
The StyleSheetTheme is exactly what you're looking for. It's pretty easy.

1. Create your cascading style sheet as usual and put it into a "Theme"
ASP.NET folder in your site.
2. Add a reference to your StyleSheetTheme on each page or in the Web.Config
3. Add a skin file that references the CSS you created (see below).
4. On non-skinned controls or standard html controls just add the
CssClass="yourcssclass" property

Sample Skin Using CSS

<asp:GridView
SkinId="GridViewSkin"
runat="server"
AllowPaging="True"
AllowSorting="True"
CellPadding="5"
CellSpacing="0"
CssClass="gvtable"
EnableSortingAndPagingCallbacks="True"
GridLines="Vertical">
<AlternatingRowStyle CssClass="gvaltrow" />
<EditRowStyle />
<HeaderStyle CssClass="gvheader" />
<PagerStyle CssClass="gvfooter" />
<RowStyle CssClass="gvrow" />
<SelectedRowStyle />
</asp:GridView>
--
Jeff Lynch
"Ramblings From A [Microsoft] Connected Universe"
http://codebetter.com/blogs/jeff.lynch
"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:eE**************@TK2MSFTNGP10.phx.gbl...
Ever tried looking at the source? Holy Mackerel.
Is there some strategy to use CSS with Themes that does not result in the
framework generating inline styles for every HTML element of the page?
I haven't used a StyleSheetTheme yet. What does it do "in this context?"

<%= Clinton Gallagher

Mar 28 '06 #2
q
I tried doing that one... forget that. Wasted a ton of time. I ended
up writing the thing manually. I'm wondering if the attributes for
Themes even work.

Mar 28 '06 #3
Hello Jeff,

Thank you. Do you have any comments about allowing a user to change a
StyleSheetTheme using a DropDownList as we can do when using the Theme?

<%= Clinton Gallagher
"Jeff Lynch" <je********@newsgroup.nospam> wrote in message
news:O$**************@TK2MSFTNGP10.phx.gbl...
The StyleSheetTheme is exactly what you're looking for. It's pretty easy.

1. Create your cascading style sheet as usual and put it into a "Theme"
ASP.NET folder in your site.
2. Add a reference to your StyleSheetTheme on each page or in the
Web.Config
3. Add a skin file that references the CSS you created (see below).
4. On non-skinned controls or standard html controls just add the
CssClass="yourcssclass" property

Sample Skin Using CSS

<asp:GridView
SkinId="GridViewSkin"
runat="server"
AllowPaging="True"
AllowSorting="True"
CellPadding="5"
CellSpacing="0"
CssClass="gvtable"
EnableSortingAndPagingCallbacks="True"
GridLines="Vertical">
<AlternatingRowStyle CssClass="gvaltrow" />
<EditRowStyle />
<HeaderStyle CssClass="gvheader" />
<PagerStyle CssClass="gvfooter" />
<RowStyle CssClass="gvrow" />
<SelectedRowStyle />
</asp:GridView>
--
Jeff Lynch
"Ramblings From A [Microsoft] Connected Universe"
http://codebetter.com/blogs/jeff.lynch
"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:eE**************@TK2MSFTNGP10.phx.gbl...
Ever tried looking at the source? Holy Mackerel.
Is there some strategy to use CSS with Themes that does not result in the
framework generating inline styles for every HTML element of the page?
I haven't used a StyleSheetTheme yet. What does it do "in this context?"

<%= Clinton Gallagher


Mar 28 '06 #4
Clinton,

I've never tried it in ASP.NET 2.0 but it should work.

--
Jeff Lynch
"Ramblings From A [Microsoft] Connected Universe"
http://codebetter.com/blogs/jeff.lynch
"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hello Jeff,

Thank you. Do you have any comments about allowing a user to change a
StyleSheetTheme using a DropDownList as we can do when using the Theme?

<%= Clinton Gallagher
"Jeff Lynch" <je********@newsgroup.nospam> wrote in message
news:O$**************@TK2MSFTNGP10.phx.gbl...
The StyleSheetTheme is exactly what you're looking for. It's pretty easy.

1. Create your cascading style sheet as usual and put it into a "Theme"
ASP.NET folder in your site.
2. Add a reference to your StyleSheetTheme on each page or in the
Web.Config
3. Add a skin file that references the CSS you created (see below).
4. On non-skinned controls or standard html controls just add the
CssClass="yourcssclass" property

Sample Skin Using CSS

<asp:GridView
SkinId="GridViewSkin"
runat="server"
AllowPaging="True"
AllowSorting="True"
CellPadding="5"
CellSpacing="0"
CssClass="gvtable"
EnableSortingAndPagingCallbacks="True"
GridLines="Vertical">
<AlternatingRowStyle CssClass="gvaltrow" />
<EditRowStyle />
<HeaderStyle CssClass="gvheader" />
<PagerStyle CssClass="gvfooter" />
<RowStyle CssClass="gvrow" />
<SelectedRowStyle />
</asp:GridView>
--
Jeff Lynch
"Ramblings From A [Microsoft] Connected Universe"
http://codebetter.com/blogs/jeff.lynch
"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in
message news:eE**************@TK2MSFTNGP10.phx.gbl...
Ever tried looking at the source? Holy Mackerel.
Is there some strategy to use CSS with Themes that does not result in
the framework generating inline styles for every HTML element of the
page?
I haven't used a StyleSheetTheme yet. What does it do "in this context?"

<%= Clinton Gallagher



Mar 28 '06 #5

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...
1
by: Seefor | last post by:
I may be missing something, but why aren't master pages part of themes? i.e. why don't they go in the App_Themes or global Themes directory, and be referenced just by name (not full path) in the...
3
by: Markus Rytterkull | last post by:
I'm porting an application from asp to asp.net2.0 and thought this would be a good time to test masterpages and themes. The end result is fine but I find it difficult to recreate forms in...
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...
1
by: sbelgrave | last post by:
First off. Hats off to MS to really doing a good job of major fixes on VS 2K5. It is really a lot better. I have begun using Master Pages with Themes but am a bit confused as to how to make the...
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...
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...
0
by: =?Utf-8?B?Q2hyaXN0b3BoZXI=?= | last post by:
We have a web product built on ASP.NET v2.0 which we are preparing a release on ASP.NET v3.5 Many of our customers have added custom pages inside our product (which we call Modules) built on...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.