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


<html>

<head>

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


<style type="text/css">

/*<![CDATA[*/

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

</head><body>/*]]>;*/


<title>IRIS</title>

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

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


<div class="top-line">

.

.

.

</body>

</html>

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