Order of css files in header

How can I set the order of css files to be loaded?

I made a widget which must override some css classes of its parent, but because the new css is loaded first, parent’s classes override my classes.

Now this is the order in source file:




<link rel="stylesheet" type="text/css" href="/blog/assets/4cf7644/tabview.css" />

<link rel="stylesheet" type="text/css" href="/blog/assets/40d5ce77/yiitab/jquery.yiitab.css" media="screen" />



tabview.css must override yiitab/jquery.yiitab.css classes.

Or, which is the right way to do this?

To override the default css files you must place your custom file on the very bottom of the declaration section (reads header) but this would not always guarantee you the effect. You should also keep in mind the inheritance/precedence rules in css.

I also run into this problem.

I solved in this way: I set in config/main.php widgetFactory for CJuiTab ‘cssFile’=>false.

This make so that the cssFile is not loaded at all.

Now you can include manually both css (or publish/register) in the order you need.