473,408 Members | 2,734 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,408 software developers and data experts.

Override main style sheet in masterpage

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 '08 #1
2 2348
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! |
********************************************
<je**************@gmail.comwrote in message
news:89**********************************@f63g2000 hsf.googlegroups.com...
>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 '08 #2
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.
<je**************@gmail.comwrote in message
news:89**********************************@f63g2000 hsf.googlegroups.com...
>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 '08 #3

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

Similar topics

1
by: David Bradbury | last post by:
I may be thinking about this the wrong way, but here goes: In my style sheet I've specified that bullet points should use a specific image rather than just be default bullet points. However, at...
11
by: brett | last post by:
If I want all text, no matter where it is, to be gray, is there a way to override styles and have that color take affect? It would need to override DIVs, tables, SPANs, anywhere inline styles are...
2
by: Rob Roberts | last post by:
In a VS2005 ASP.NET project, I'm trying to find a way to change which css file is linked in based on the browser type. I'd like to use one css file for IE browsers, and a different one for all...
2
by: mjansen.merge.emed | last post by:
Is there a way to override inline within the <bodya style of an element but not do it with a style attribute on the element? I know CSS Inheritance works for some styles, but doesn't appear to...
0
by: Robert Bravery | last post by:
Hi, I'm new to this, so excuse the obvioous questions. I creating a eb form, that has masterpages set. I created a style shet. Added that to my project. Then, in the help files, it suggests to...
8
by: Amit | last post by:
I have a master page and a content page but the stylesheet isnt getting applied like how it looks in visual studio design view. The master page is defined like this: <%@ Master Language="VB"...
0
by: jobs | last post by:
I'm pulling my hair out. About a month ago I started a asp.net 2.0 project and I created a style sheet and skin file. I set the positioning of my divs, body font and colors etc.. everything nice...
1
by: pvong | last post by:
I'm new to VS2008. I'm doing this in VB.NET. I created a style sheet called Style1.css and I have it under the App_Themes folder. I have a nested Masterpage that I want to have access to the...
2
by: raghulvarma | last post by:
I have a master page like <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.