Css in theme not applying in VS2005

Discussion in 'ASP .Net Web Controls' started by MattC, Apr 19, 2007.

  1. MattC

    MattC Guest

    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
     
    MattC, Apr 19, 2007
    #1
    1. Advertising

  2. MattC

    Phil H Guest

    On 19 Apr, 16:26, "MattC" <> wrote:
    > 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
     
    Phil H, Apr 26, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UGF0cmljay5PLklnZQ==?=

    Skin theme color Question(CSS)

    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=, Nov 29, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    407
    Michelle Hlaing
    Nov 29, 2004
  2. Noozer
    Replies:
    2
    Views:
    6,410
    Noozer
    Sep 26, 2004
  3. =?Utf-8?B?d2FsdGVy?=

    Theme support in VS2005 designer view?

    =?Utf-8?B?d2FsdGVy?=, Apr 26, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    736
    =?Utf-8?B?d2FsdGVy?=
    Apr 26, 2006
  4. Jeff

    Problem applying theme to page!

    Jeff, Apr 10, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    520
  5. susan bell

    CSS not applying

    susan bell, Dec 4, 2009, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    781
    Nathan Sokalski
    Dec 11, 2009
Loading...

Share This Page