how to disable drupal7 system css files?

Tags: css,views,drupal-7

Problem :

I've created a new view and changed some styles in view.css. But when I load the page, my styles are overridden by style.css and system.theme.css.

Is there a way to set my css "before" the system css?

Solution :

Add to your theme's template.php file:

function THEMENAME_css_alter(&$css) {

This is a pretty extreme option. In many instances you may want to just override with more specific CSS as Rory suggests. Or use a combination of the techniques.

solution from:

    CSS Howto..

    How do I make LessCSS output css which is then uploaded to webserver

    How to do onclick in CSS to do transition on image?

    How to set a css class to table header cell

    How to animate the movement of inline-block items on page resize (ideally using css)?

    CSS: How to align text, next to image inside a span?

    Dropdown Menu doesn't show all links and can't change css social media icons color

    How to generate CSS with loop in less

    How to create button backgrounds with css

    how to make tab bar in jquery mobile?

    How to link external CSS stylesheets on a Chromebook

    How do I apply a border around a checkbox when checked?

    How to position background image in bottom right corner? (CSS)

    How to use a backslash in css content property?

    How to change button colors upon click (Javascript)?

    How to deselect using :not according to css property and value

    TYPO3: how to add an element to the RTE, which allows the user to use a defined CSS class

    How to create a responsive popup using fancybox 2?

    How to draw a dotted line with css?

    How to default a custom-styled dropdown to browser default style dropdown

    Is it possible to compress LESS CSS files with htaccess? (and how to?)

    How to extend css class

    How to achieve disorganised bubble layout with html css?

    How to make list items of one UL with fixed height be displayed as columns?

    How does height of a div relate to font size

    How to make css layout to fit html content?

    How to remove top / bottom margin from isotope masonry

    How can I get the seletced filename from file button?

    How to Add custom Css Clases to PyroCMS contact form elements

    How to color the Horizontal and Vertical Lines at (0,0) darker in JavaFX

    How erase extra black on drop down menu