Registercss Wrong Code Placement

Hello. I have a problem with registerCss() function.

My call is something like this

Yii::app()->clientScript->registerCss('st',"<style>.wrap { color:red; }</style>"

but the resulting HTML looks like this



<meta http-equiv="content-type" content="text/html; charset=utf-8">

<style type="text/css">


<style>.wrap { color:red; }</style>



<link rel="stylesheet" type="text/css" href="*link to css file*" media="screen">

<script src="*link to jquery*"></script>

<div class="top-line">






Doesn’t matter if the call is in view, controller or layout. The result is the same - missplaced </head> and <body> tags. Yii version is 1.1.12

Well of course, <style></style> isn’t CSS code, so you shouldn’t be using it with registerCss().

That’s it. Thanks