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 can mono social icon work without a class per icon?

    how to make css dropdown menu a dropup menu

    How to debug web page rendering compatibility issues across browsers?

    How to use CSS in ASP.NET application

    how to center an item when it's the only one in a multi-column layout

    How to add css in php file? [closed]

    How to adjust the position a table to the bottom inside a DIV?

    How can I toggle between multiple .css with jquery?

    How to include SASS into CSS

    How can I limit Bootstrap column to a specific column's height?

    How to css target “Tab” state of the input?

    How to make the submenu to be at the same horizontal as its parent's menu with this css?

    How to center absolute position element in my case

    select the element before the last using nth child regardless of how many elements you have? [duplicate]

    How to use css to crop parts of an image

    How to extend background CSS styling indefinitely along the x-axis?

    How to set different table widths using CSS or jQuery?

    Css Drop down menu, how to keep menu infront of content

    How to switch between multiple CSS animations?

    With HTML and CSS, how to have an image that is vertically aligned with a horizontal line?

    How to show blocks for progressbar using CSS

    HTML with CSS: How to style font in a table?

    How to float

    to bottom of a

    when you can't use position:relative and position:absolute

    How to write variable with multiple css properties in Sass

    How to add spacing between two span elements

    How to position background image in a button

    How do I float a div to the right of a title div without affecting the content of the title?

    How to get a 2 column widget area defined in CSS?

    How to add css 3dtransform property with jquery to a dom element?

    How to center an image, make it act as an link and have an mouseover command?