Pager css override

I want to override the css of the pager widget in my application. I know which css styles to change, but it seems that the default css styles provided by the CLinkPager class override my own changes. This happens because the provided CLinkPager css file is generated inside the assets directory, which is included last at the generated HTML page. See an example:

<link rel="stylesheet" type="text/css" href="/..../css/main.css" />


<link rel="stylesheet" type="text/css" href="/..../css/form.css" />


<link rel="stylesheet" type="text/css" href="/..../assets/2d001eb3/pager.css" />


<title>foo foo</title>


</head>





<body>


How do I solve this issue?

You can set CLinkPager.cssFile=false. Or if you still want the CSS file published by CLinkPager, you can place your own CSS file under the <title> tag.

OK, but if I set CLinkPager.cssFile=false, then I must set all css styles from the beginning. Why shouldn’t overriding just the styles I want enough? From my point of view, I think putting the widget’s css last is wrong behaviour.

try this?



<?php $this->widget('CLinkPager',array('pages'=>$pages, 'cssFile'=>'/path/yourcssfile.css')); ?>


Quote

OK, but if I set CLinkPager.cssFile=false, then I must set all css styles from the beginning. Why shouldn't overriding just the styles I want enough? From my point of view, I think putting the widget's css last is wrong behaviour.

Please read my comments carefully. I gave two options. ;)