Solved

Disable CSS style?

Posted on 2006-11-18
2
8,856 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 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
iOS 10 iPad Zoom and acroll 4 70
Bootstrap more than 12 columns in row 3 52
Zoom the page when you go in from your phone 3 53
dashicon not showing on one website 13 18
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…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…

816 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now