Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Registercss Wrong Code Placement

$
0
0
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

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>