Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to override/remove certain attribute in an externally hosted css (specifically Google CDN jquery-ui.css)?

I am using Google CDN to host one of jQuery UI theme's CSS.

However there are some css properties that I would like to override.

I understand it's possible to do it with jQuery .removeClass() or .css(), but can I do it with my own css file?

For example, in the jQuery UI theme's css, there is

.ui-widget {
    font-family: Verdana, Arial, sans-serif;
    font-size: 1.1em;
}

How would I remove the font-size attribute? I don't necessary want to override it. I just want to completely remove it so that the font-size defaults back to the body property of 0.75em.

like image 916
hobbes3 Avatar asked May 22 '12 22:05

hobbes3


People also ask

How do you override attributes in CSS?

To override the CSS properties of a class using another class, we can use the ! important directive. In CSS, ! important means “this is important”, and the property:value pair that has this directive is always applied even if the other element has higher specificity.

How we can remove CSS in jquery?

To remove all CSS classes of an element, we use removeClass() method. The removeClass() method is used to remove one or more class names from the selected element.


1 Answers

As @thirtydot stated in the comments, the font-size property of .ui-widget to inherit.

like image 102
Tyler Crompton Avatar answered Nov 15 '22 18:11

Tyler Crompton