[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Disable CSS style?

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

Independent Software Vendors: 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

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
Suggested Courses
Course of the Month19 days, 7 hours left to enroll

872 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