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

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="mystylesheet.css">

...

</div>
Within this div, I would like mystylesheet.css 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.css to be applied.

Dave
--
http://www.rexx.com/~dkuhlman
Jul 21 '05 #1
2 1519
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="mystylesheet.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="mystylesheet.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
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...
3
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...
0
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:...
5
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 =...
3
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! ...
3
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...
2
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...
9
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,...
2
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.