Css in theme not applying in VS2005

M

MattC

Hi,

I'm running a trial version of VS2005 (8.0.50727.762) and have created a Web
Application (after applying the update to allow 1.1 style web apps) project.
I have added an App_Themes folder in which is location Default.css.

My is a simple LoginView control contained within a MasterPage Content
Control.

The Master Page in the following:

<form id="form1" runat="server">
<div id="masterHeader">Master Header</div>
<div>
<asp:ContentPlaceHolder ID="MainTestArea" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>

and my default.css is

#masterHeader
{
width: 100%;
height: 50px;
font-family:'Verdana';
font-size:20px;
color:#eeeeee;
background-color: Gray;
}

When I run the website using the inbuild webserver to VS2005 it doesn't
apply my CSS theme. If I go to internet explorer and type localhost direct
then my css style is applied correctly?

What am I doing wrong?

TIA

MattC
 
P

Phil H

Hi,

I'm running a trial version of VS2005 (8.0.50727.762) and have created a Web
Application (after applying the update to allow 1.1 style web apps) project.
I have added an App_Themes folder in which is location Default.css.

My is a simple LoginView control contained within a MasterPage Content
Control.

The Master Page in the following:

<form id="form1" runat="server">
<div id="masterHeader">Master Header</div>
<div>
<asp:ContentPlaceHolder ID="MainTestArea" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>

and my default.css is

#masterHeader
{
width: 100%;
height: 50px;
font-family:'Verdana';
font-size:20px;
color:#eeeeee;
background-color: Gray;

}

When I run the website using the inbuild webserver to VS2005 it doesn't
apply my CSS theme. If I go to internet explorer and type localhost direct
then my css style is applied correctly?

What am I doing wrong?

TIA

MattC

Hi

In order for a theme to be applied you need to do two things.
(1) create a subfolder beneath the app_themes directory (the wizard
names it theme1 by default) which signifies the name of the theme and
place CSS or SKIN files in there.
(2) Insert an attribute to apply the theme in one of two places:
(a) in the @ page directive of an individual page or
(b) in the <pages> tag of web.config for site-wide application.
The attribute takes the form 'Theme=' followed by the theme name

HTH
 

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,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top