How To Change Style Of Yii Page Navigation Next And Previous Button

I have CListView in a yii view, default page navigation button are displaying( previous,next,etc buttons) and i want to change background image of that buttons or i have to do page navigation manually for button i created(for next and previous button).

Hi viswa, welcome to the forum.

The appearance of the default page navigation buttons (i.e. CLinkPager) of CListView is defined by a CSS file. The source file is /framework/web/widgets/pagers/pager.css.

But please don’t edit it. It belongs to the framework core, and you are not supposed to modify it.

Instead, you can copy it to your own directory under the document root (e.g. /css/myPager.css), modify it as you like, and setup your CLinkPager to use it.




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

	'id' => 'my-list',

	'dataProvider' => $model->search(),

	'pager' => array(

		'cssFile' => '/css/myPager.css'

	),

	'itemView' => '_view',

));



In the above ‘pager’ is the configuration of the pager of CListView.

http://www.yiiframework.com/doc/api/1.1/CBaseListView#pager-detail

And it specifies the ‘cssFile’ property of the pager.

http://www.yiiframework.com/doc/api/1.1/CLinkPager#cssFile-detail