?
Solved

Disable CSS style?

Posted on 2006-11-18
2
Medium Priority
?
8,866 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 200 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

800 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