473,721 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Stylesheet for a section of a page

I'd like to specify a stylesheet for a section of my page. And,
within that section, I want my stylesheet to override all other
stylesheets (and styles). For example:

<div style="mystyles heet.css">

...

</div>
Within this div, I would like mystylesheet.cs s to be applied and
all other stylesheets ignored. Is this possible? I've read
several documents, for example, about linking in external
stylesheets, but can't find a way to do it.

The reason I need this is that my section of the page is in the
content area in the middle of a CMS page, and the CMS is using its
own stylesheet for the surrounding areas. I don't what that
other stylesheet applied in my section (the content area) and I
want mystylesheet.cs s to be applied.

Dave
--
http://www.rexx.com/~dkuhlman
Jul 21 '05 #1
2 1548
On Mon, 14 Feb 2005 20:16:11 GMT, Dave Kuhlman <dk******@rexx. com> wrote:
I'd like to specify a stylesheet for a section of my page. And,
within that section, I want my stylesheet to override all other
stylesheets (and styles). For example:

<div style="mystyles heet.css">

...

</div>


Use an id

<div id="mystyles">

and style the elements you use in that div in your stylesheet (no need for
a separate one) like

div#mystyles p {
font-weight:bold; }

div#h1, div#h2, div#h3, div#h4 {
color:red; }

div#a:link {
color:purple; }

Well, you get the general idea.
--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'
Jul 21 '05 #2
Barbara de Zoete wrote:
On Mon, 14 Feb 2005 20:16:11 GMT, Dave Kuhlman <dk******@rexx. com> wrote:
I'd like to specify a stylesheet for a section of my page. And,
within that section, I want my stylesheet to override all other
stylesheets (and styles). For example:

<div style="mystyles heet.css">

...

</div>


Use an id

<div id="mystyles">

and style the elements you use in that div in your stylesheet (no need for
a separate one) like

div#mystyles p {
font-weight:bold; }

div#h1, div#h2, div#h3, div#h4 {
color:red; }

div#a:link {
color:purple; }

Well, you get the general idea.


Great. Thanks. It took a bit of editing on my stylesheet. But,
that seems to be working. I appreciate the pointer.

Dave

--
http://www.rexx.com/~dkuhlman
Jul 21 '05 #3

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

Similar topics

2
2821
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/authoring-faq Posting-Frequency: twice a week (Mondays and Thursdays) Last-modified: August 28, 2002 Version: 1.15 URL: http://css.nu/faq/ciwas-aFAQ.html Maintainer: Jan Roland Eriksson <rex@css.nu> ciwas stylesheet authoring FAQ v1.15 ______________________________________________________________________
3
4330
by: Jamie | last post by:
Hi, Thanks for the excellent answer to my last question! One more: Does anyone have a method they follow for organizing stylesheets themselves? They seem like they can get bloated and hard to read. Aside from putting all the "h1" rules together, I haven't thought of any way to do it, if it's necessary at all. J.
0
1959
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/authoring-faq Posting-Frequency: twice a week (Mondays and Thursdays) Last-modified: April 10, 2003 Version: 1.16 URL: http://css.nu/faq/ciwas-aFAQ.html Maintainer: Jan Roland Eriksson <rex@css.nu> ciwas stylesheet authoring FAQ v1.16 ______________________________________________________________________
5
1546
by: Andrew Poulos | last post by:
I'm trying to change a style in a stylesheet. The following code works in FF, MZ, and IE6 but IE 5 gives the error of "invalid procedure call or argument": var oStyleSheet = window.document.styleSheets.imports; oStyleSheet.addRule("td","font-size:1.2em;"); Is there a way to do this with IE 5? Andrew Poulos
3
1076
by: MattB | last post by:
Is there a place I can specify a CSS stylesheet that will be applied to all pages in my app? I've been adding it to the <head> of each page, but it sure would be easier to specify it once. TIA! Matt
3
11916
by: Dave | last post by:
Is there a way to dynamically add a reference to the css stylesheet from the codebehind similarly to the script registration features? I was thinking of adding this code to a base class and inherit all my pages from it so the css link below is added to each page automatically in the <head> section.... <LINK href="/MyApp/Css/MyApp.css" type="text/css" rel="stylesheet"> Thanks, Dave.
2
1824
by: Nathan Sokalski | last post by:
I have a user control that uses classes from a CSS Stylesheet. Because a User Control does not have a <head> section, I do not know where to put a link tag to link it to the stylesheet. If I manually place a a link tag in the page that I use the User Control in it works fine, but is there a way to have the control add this link tag for me when I insert the control? Thanks. -- Nathan Sokalski njsokalski@hotmail.com...
9
2000
by: gkountz | last post by:
Hi: I am brand new to css and a have a limited amount of working knowledge regarding HTMl. This is primarily from using Frontpage. I recently purchased Stylemaster, a css authoring program, and created a stylesheet. Here's my problem. When I link to the stylesheet only the background image appears. None of the other statements describing the page seem to work. I have embedded the code in another page and that page works fine. ...
2
1827
by: newbie | last post by:
Is there a tool to identify used / unused styles in a stylesheet? I have a tendency to accumulate styles in a stylesheet. Many of these styles are not actually employed by the page, so many of the defined styles are redundant. Is there a way to identify which styles are used or not used? My normal way is to make changes to one section, then look at the page to see if anything changes, if it does, the style is in use and I have
0
8840
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8730
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9215
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9131
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9064
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6669
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5981
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4753
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2130
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.