Override main style sheet in masterpage

Discussion in 'ASP .Net' started by jessicalgaudette@gmail.com, Sep 2, 2008.

  1. Guest

    I have been asked to change some background colors in a website that
    use a masterpage. This only effects 6, with each set of 2 using a
    different stylesheet of the many web pages, but I am having trouble
    trying to override the main stylesheet on the pages it effects. Can
    anyone point me in the right direction? Thanks!
    , Sep 2, 2008
    #1
    1. Advertising

  2. You can use subclasses master pages and only override the colors you need to
    (in the page, not the CSS file). This is probably the easiest way to do it.
    Anything embedded on the page proper will override styles in the CSS file,
    per rules of CSS. As another option, you can add different CSS files for
    that portion. Same idea, but linked rather than embedded.

    If this is not good enough, you can link the CSS file during render
    programatically. I am not sure how exactly one would do this, but I am sure
    you can google it. I would say this is a second option if all you are doing
    is changing a few colors.

    --
    Gregory A. Beamer
    MVP, MCP: +I, SE, SD, DBA

    Subscribe to my blog
    http://feeds.feedburner.com/GregoryBeamer#

    or just read it:
    http://feeds.feedburner.com/GregoryBeamer

    ********************************************
    | Think outside the box! |
    ********************************************
    <> wrote in message
    news:...
    >I have been asked to change some background colors in a website that
    > use a masterpage. This only effects 6, with each set of 2 using a
    > different stylesheet of the many web pages, but I am having trouble
    > trying to override the main stylesheet on the pages it effects. Can
    > anyone point me in the right direction? Thanks!
    Cowboy \(Gregory A. Beamer\), Sep 2, 2008
    #2
    1. Advertising

  3. Hillbilly Guest

    Insufficient information for me; are you using a Theme or StyleSheetTheme?
    Have any controls been bound to a stylesheet, i.e. CssClass="SomeClass" and
    when you say --background-- what do you refer to? The background of the
    page? What? What do you mean effects 6 with each set of 2? Of what?

    Yes, these criteria matter to give a cogent reply.


    <> wrote in message
    news:...
    >I have been asked to change some background colors in a website that
    > use a masterpage. This only effects 6, with each set of 2 using a
    > different stylesheet of the many web pages, but I am having trouble
    > trying to override the main stylesheet on the pages it effects. Can
    > anyone point me in the right direction? Thanks!
    Hillbilly, Sep 2, 2008
    #3
    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?QWxleCBNYWdoZW4=?=

    MasterPage -> Page -> MasterPage Code Access

    =?Utf-8?B?QWxleCBNYWdoZW4=?=, Apr 10, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    7,866
    Steven Cheng[MSFT]
    Apr 14, 2006
  2. Replies:
    0
    Views:
    507
  3. ThunderMusic
    Replies:
    2
    Views:
    431
    Gregory Gadow
    Sep 27, 2006
  4. Randy Smith
    Replies:
    9
    Views:
    409
    Mark Rae
    Apr 14, 2007
  5. mr t
    Replies:
    0
    Views:
    386
Loading...

Share This Page