473,698 Members | 1,997 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 1546
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
2819
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
4329
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
1955
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
1075
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
11915
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
1823
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
1998
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
1826
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
9016
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
8887
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
8856
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...
0
7709
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6515
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
4360
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4613
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2321
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1997
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.