I recently started using the Yii framework trying to learn a little bit more about MVC.
I have currently made a view whose markup looks similar to the following:
<div id=container">
<div id="banner"></div>
<?php echo $content?>
<div id="separator"></div>
<div id="footer"></div>
</div>
When the page loads the source file now looks like this:
<div id="container">
<div id="banner"></div>
<div id="content">Content in here</div>
</div>
<div id="separator"></div>
<div id="footer"></div>
Any idea what is causing Yii to forcefully close off my container div? When separator and footer are above the line they are included in the container div so it is most likely something to do with Yii’s rendering method. Oddly enough I cannot find any similar issues online.
I am trying to code cleanly so while I could just use another container for alignment and CSS3 purposes, being able to keep the separator and footer in the container div to begin with would be better.
I had pretty the same problem, but for me the problem was under IE(At least was visible under IE only. Wasn’t have time to check why).
I solve the problem by changing a line of code in jquery.yiigridview.js (remaped via CGridView -> baseScriptUrl param):
EDIT: Forgot to mention that I use renderPartial to render view with single CGidView in it.
In the controller have logic that check for ajax request and if is so, then rendering this subview and call Yii::app()->end(). In all other cases, controller renders regular view, that call renderPartial with single CGidView.