change the general pager css for all application

hi all,

like in the title, how can i change the general pager css for all application ? i mean not in only clistview or gridveiw i indicate that yii must put css pager to "false"

example :




<?php $this->widget('zii.widgets.CListView', array(

	'dataProvider'=>$dataProvider,

	'itemView'=>'_view',

	[color="#FF0000"]'pager'=>array('cssFile'=>false),[/color]

)); ?>



NOT that, but is there a general setting for this ?

What I do is just copy the css from yiipager.css (IIRC) and paste it into my own stylesheet and modify it.

It will override the default styles.

That’s by far the easiest and most flexible option. :)

It’s called pager.css and contains this:




/**

 * CSS styles for CLinkPager.

 *

 * @author Qiang Xue <qiang.xue@gmail.com>

 * @link http://www.yiiframework.com/

 * @copyright Copyright &copy; 2008-2010 Yii Software LLC

 * @license http://www.yiiframework.com/license/

 * @version $Id: pager.css 1678 2010-01-07 21:02:00Z qiang.xue $

 * @since 1.0

 */


ul.yiiPager

{

	font-size:11px;

	border:0;

	margin:0;

	padding:0;

	line-height:100%;

	display:inline;

}


ul.yiiPager li

{

	display:inline;

}


ul.yiiPager a:link,

ul.yiiPager a:visited

{

	border:solid 1px #9aafe5;

	font-weight:bold;

	color:#0e509e;

	padding:1px 6px;

	text-decoration:none;

}


ul.yiiPager .page a

{

	font-weight:normal;

}


ul.yiiPager a:hover

{

	border:solid 1px #0e509e;

}


ul.yiiPager .selected a

{

	background:#2e6ab1;

	color:#FFFFFF;

	font-weight:bold;

}


ul.yiiPager .hidden a

{

	border:solid 1px #DEDEDE;

	color:#888888;

}


/**

 * Hide first and last buttons by default.

 */

ul.yiiPager .first,

ul.yiiPager .last

{

	display:none;

}

Copy that and paste into your main stylesheet and start hacking.

I know that there are other ways - more official ways - but I am incredibly lazy… :)

Also in you application config you might override default css for all CLinkPager (or any other widget) instances:




...

	'components'=>array(

		'widgetFactory'=>array(

			'widgets'=>array(


				'CLinkPager'=>array(

					'cssFile'=>(strlen(dirname($_SERVER['SCRIPT_NAME']))>1 ? dirname($_SERVER['SCRIPT_NAME']) : '' ) . '/css/pager.css',

				),


			),

		),

	),

...