Solved

Disable CSS style?

Posted on 2006-11-18
2
8,857 Views
Last Modified: 2010-05-18
We're using Rainbow Portal which automatically imports CSS files for the entire portal.  I've created a new .ASPX page and have it css styled exactly the way i want it within FF and IE using strict doctype.  However when portal's css information is applied to the page everything is a mess.  The portal's css is overriding base elements such as TD and TABLE and so my page is being drastically altered.  I've tried to add more specificty to my elements but for the most part this has been frustrating.

Unfortunately Im cant simply remove the portal's css file (it is required for a nav menu added to my page).  Is there a way i can disable all the portal css styles for a particular area within the body?  FOr instance I need to simply disable the settings on TD, TABLE, and TR so that it can take on my default properties within the page.

I';ve already tried using:
body, p, div,img, input, table,thead,tr,th,td,textarea,ol,ul
{
      font-family: inherit;
      padding:inherit;
      font-size: inherit;
      margin: inherit;
      background-color: inherit;
      border:inherit;
}      

but no luck.  Again I've tried to add more specificity and it has worked here and there but still many elements are taking on some other style.  If theres a simpler way to simply disable the offending portal css styles for an area i'd rather opt for that.

Thanks
0
Comment
Question by:aniston
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 19

Accepted Solution

by:
VoteyDisciple earned 50 total points
ID: 17972942
Well, the direct answer is: no.  You can't add styles to the page and then say, "Just kidding; I didn't want those."

Couldn't you just take out the styles you actually want from that stylesheet manually, add it to your own, and then disable the other stylesheet?


Otherwise, you should be able to increase specificity with rules like
html#something body#com-example-www div#main-content p { }

... though that's clearly cumbersome.


You can also add !important after rules:

p { font-size: 10em !important; }
0
 

Author Comment

by:aniston
ID: 17973479
Yes thats what i suspected. I was hoping for something possibly missed.  thanks.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question