How does my theme default.css get in my web page?

C

clintonG

As it turns out using Themes and stylesheets together is clunky. Any css
file located in an App_Themes directory will be parsed automatically. Noting
the same is true of subdirectorys of App_Themes which contain stylesheets we
can control the order those subdirectories and stylesheets will be parsed
using a goofy alphanumeric naming schema such as

App_Themes
1a_styles.css
1b_styles
2a_styles.css
....

To load a second style sheet for a specific page you'll have to try a goofy
workaround like locating the stylesheet in some other directory and then
writing the stylesheet into the page -- after -- the stylesheet(s) the Theme
writes into the page.

It sounds like you may have made the same mistake I did by using Themes
before learning the difference that can be managed when using a
StyleSheetTheme. I think using a StyleSheetTheme may be better than using
Themes. I think K. Scott Allen's blog [1] which I consider a must read
covers this well, especially for MasterPages

I'd certainly like to hear comments from those who have used both Themes and
a StyleSheetTheme on projects...

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-88043838&z=17&l=0&m=h


[1] http://odetocode.com
 
G

Guest

Yuck. Ok, how can we hardcode 1 page to not use the theme at all and instead
to use a different css? That css does not have to be in the theme directory
although I would prefer it.

This is for our error.aspx page where we want as little as possible in it to
keep it simple and avoid issues with either code or security permissions.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




clintonG said:
As it turns out using Themes and stylesheets together is clunky. Any css
file located in an App_Themes directory will be parsed automatically. Noting
the same is true of subdirectorys of App_Themes which contain stylesheets we
can control the order those subdirectories and stylesheets will be parsed
using a goofy alphanumeric naming schema such as

App_Themes
1a_styles.css
1b_styles
2a_styles.css
....

To load a second style sheet for a specific page you'll have to try a goofy
workaround like locating the stylesheet in some other directory and then
writing the stylesheet into the page -- after -- the stylesheet(s) the Theme
writes into the page.

It sounds like you may have made the same mistake I did by using Themes
before learning the difference that can be managed when using a
StyleSheetTheme. I think using a StyleSheetTheme may be better than using
Themes. I think K. Scott Allen's blog [1] which I consider a must read
covers this well, especially for MasterPages

I'd certainly like to hear comments from those who have used both Themes and
a StyleSheetTheme on projects...

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-88043838&z=17&l=0&m=h


[1] http://odetocode.com


David Thielen said:
Hi;

It's there but I don't see anywhere that I actually tell my pages to
include
default.css from my theme?

And how can I add a second css file from my theme to a specific page?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
S

Steven Cheng[MSFT]

Hi Dave,

If you want a specific page to not use Theme, you can simply disable the
Theme on that page .e.g.

<%@ Page EnableTheming="false" %>

Thus, any controls on the page will not apply any theme setting either.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 
C

clintonG

To add to Steven's comments I would also consider simplifying and using
simple HTML for the error page. Something simple for example like 404.htm
that allows simple embedded or linked style declarations. The problem with
Steven's solution is no Themes may be used in that page even if you develop
an alternate so you'll have to fall back to HTML and CSS anyway right?

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-88043838&z=17&l=0&m=h
 

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

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top