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

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

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
Dec 17 '06 #1
4 5845
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=-...8&z=17&l=0&m=h
[1] http://odetocode.com
"David Thielen" <th*****@nospam.nospamwrote in message
news:E2**********************************@microsof t.com...
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


Dec 18 '06 #2
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" wrote:
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=-...8&z=17&l=0&m=h
[1] http://odetocode.com
"David Thielen" <th*****@nospam.nospamwrote in message
news:E2**********************************@microsof t.com...
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


Dec 18 '06 #3
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.

Dec 18 '06 #4
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=-...8&z=17&l=0&m=h
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:e0**************@TK2MSFTNGHUB02.phx.gbl...
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.

Dec 18 '06 #5

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

Similar topics

0
by: Chenghui Li | last post by:
We have a problem with the Windows XP theme: We have a IDE which allows other developers to develop visual programs for their customers. Our IDE allow them to set font for window captions easyly...
3
by: Sachin | last post by:
Hi All, I have a Theme folder "Default" which contians some skins, css files etc. I have specified default theme in Web.Config file under pages section. However, theme is not getting applied to...
4
by: Ben | last post by:
Hi, I'm using images in my menu control. I have my menu setup based on this example: http://msdn2.microsoft.com/en-US/library/system.web.ui.webcontrols.menuitembinding.imageurlfield(VS.80).aspx ...
0
by: William Sullivan | last post by:
I have a content page that is in a subdirectory that is restricted to certain user groups. My website's virtual directory structure looks like this: ~\mywebpage masterpage.master default.aspx...
1
by: Jeff | last post by:
Hey ASP.NET 2.0 In my website project the Default.aspx page contains this image: <asp:TableRow> <asp:TableCell> <asp:Image ID="imgBar" runat="server" ImageUrl="~/Network/Bar.aspx" />...
1
by: shapper | last post by:
Hello, I created a theme folder where I place my Skin and CSS files. I have 5 files: Base.skin, Base.css, Default.css, Contacts.css, Print.css Base Skin and CSS files should be used on...
3
by: =?Utf-8?B?dG9t?= | last post by:
Hi All, I have a theme with a Style.css in which I have defined a style rule for the body element : body { min-width: 780px; margin: 0; padding: 0;
4
by: Neil Jones | last post by:
Hello, I would like to create my own theme(s) for a couple of my own blog sites. I am hoping a few better themes could bring lot more readers. So far, I have stayed with the default wordpress...
1
by: Henry Stock | last post by:
I am having trouble referencing a theme in my ASP.NET project. I was following a model that allowed for multiple themes. So The theme that I have is stored in named "Base" under the App_Theme...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.