PHP Frameworks

How to Embed CSS into a View using the Yii Framework 1.1


This can be done using the registerCss() method of the CClientScript class. CClientScript manages JavaScript and CSS stylesheets for views.  registerCss()registers a piece of CSS code. Place code similar to the example code below in your View Yii::app()->clientScript->registerCss('customCSS',<<<CSS    li {     font-weight: normal;    } CSS ); In the code above the first parameter...

About Author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

Follow Me