开发者

Blueprint / Yii table colors

开发者 https://www.devze.com 2023-04-10 12:35 出处:网络
I am having two issues similar to the question previously posed on table colors with Blueprint CSS (al开发者_开发技巧ternating rows):

I am having two issues similar to the question previously posed on table colors with Blueprint CSS (al开发者_开发技巧ternating rows):

  1. I was able to override the zebra colors by changing both the th, td, caption to the same color as the tbody tr:nth child(even). However, when I do that, I lose the "highlighted" color change when you roll the cursor over the table results.

  2. I cannot change the table header color/fonts. I have added color and background to the table, th, thead th and nothing changes. Am I missing something?


When rendering the widget with the table add the 'css' parameter - it should be pointing at .css style. Default style shouldn't even load if you specify custom style that you want to be used with table.

Example:

        $this->widget('zii.widgets.grid.CGridView', array(
            'cssFile' => Yii::app()->getRequest()->getBaseUrl() . '/css/yiiTableStyle.css',
            'dataProvider'=>$provider,
            'columns'=>array(
                'some_name::Name'
            )
        ));
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号