How can I override an external css?


Problem :

I'm using the YUI Javascript framework, which gives me a calendar widget that comes with a css file. These are included at the top of my Site.Master file. I'd like to override the style associated with the widget, but I can't seem to figure out how.

I've tried adding an entry for the widget's class:


in both my local css file, and in a style tag in the master file. When I use Internet Explorer's developer tools to look at the page's style, it lists 3 sources for that class's style: my local css file, the ASP.Net view for the page, and the external YUI css. It never references the master file, and even when I've got the class in my local css file, the style doesn't appear in the developer tools list of styles (I don't see .yui-calendar in the list it gives me).

So the question is, what's the proper way to override the style for the class coming in from the external css file?

Solution :

You might want to try adding units to that CSS:


You need units for values other than 0 in CSS.

    CSS Howto..

    How to find the css file name associated with an element?

    How to properly float two columns side by side with css

    How to get highlighted words and wrap it in new element with data-attribute?

    How to format a table using CSS such that the table is within the screen and cells use as much possible and necessary width?

    How to prevent corners on CSS box-shadow?

    How to make groups of divs the same width using only CSS?

    How to center inline blocks together with text vertically without space at bottom?

    how to “replace” css Properties with jQuery

    How to put image tiles properly without colum gap or row gap in between using only CSS?

    How do I add another css to Bootstrap?

    CSS how to automatically resize div size?

    Conditional css showing limit items

    CSS: How to put form input fields and button next to each other in the same line?

    How to clear css cache

    how to make shape with diagonal div?

    How to make sure my css overlay is on top at any site?

    how to set the child-class height as per the parent div using css

    CSS how to vertically align text within a pseudo element

    How to set CSS rule for a DIV in a LI of class UL?

    How to use a CSS :first-letter pseudo-element in a

    How to resize the width of div left to another which has float:left;?

    How to define css selector class prefix with SASS

    How to change the Img tag src through css only? [closed]

    PrimeFaces 3.0 - How do I override the default opacity of a dialog overlay?

    How can I achieve this transparency effect using css?

    How to make text wrap when resizing in a inline div, without the div moving onto a new line first?

    How do i vertically align my form in bootstrap?

    How to Position Fixed with LOTS elements inside

    How to clear the (CSS) visited history of an Android WebView?

    How to prevent left “post” section from dropping off?