473,586 Members | 2,855 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2358
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.comwro te in message
news:89******** *************** ***********@f63 g2000hsf.google groups.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="SomeC lass" 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.comwro te in message
news:89******** *************** ***********@f63 g2000hsf.google groups.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
12176
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 some later point in the text I don't want to use the bullet point with an image, but rather use the standard bullet point. Is it possible to switch...
11
16719
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 defined, override external style sheet references, definitions in the HEAD section. I won't know ahead of time what exactly the webpage content...
2
5150
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 other browsers. I'm using a MasterPage. I added a Literal control to the Head section of the MasterPage, and then in the Page_Load event I set its...
2
5696
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 work for margins, etc. Here's my delimma: I'm generating HTML. I don't have access to the <head>. In the <head> is a stylesheet that defines a...
0
932
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 drag the style sheet onto the web form (this being the masterpage I assume) and a link will be inserted into the header. But when I do this, ALl I...
8
13513
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" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
0
1155
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 and worked perfectly. Some other work got in the way, and I had not opened the project for some time. I now open the project and everything as it...
1
1188
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 Style1.css. How do I do this. Do you add something in the <% %tags at the top to tell it to read that style sheet? Thanks!
2
2311
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 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> ...
0
7911
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8338
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7954
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8215
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6610
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1448
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.