在YII应用程序中更改CSS文件不起作用

I am trying to change the styling of the gridview, tableview, & detailview. I found something saying that I should change the config/main.php file to this:

...
// application components
'components'=>array(
    'user'=>array(
        // enable cookie-based authentication
        'allowAutoLogin'=>true,
    ),
    'bootstrap'=>array(
        'class'=>'bootstrap.components.Bootstrap',
    ),
     'widgetFactory'=>array(
        'widgets'=>array(
            'CGridView'=>array(
                'cssFile' => Yii::app()->request->baseUrl.'/css/table_and_grid.css',
            ),

        ),
    ),
...

I have removed the assets folder that is generated by the app, but that didn't help. When I load the view, I can see that the css sheet is being loaded into the header of the page, but none of the styling is working. Why? How do I fix?

查看全部
douchunsui2395
douchunsui2395
2014/02/18 17:06
  • css
  • yii
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复