Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6857153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:58:48+00:00 2026-05-27T01:58:48+00:00

I recently started using the Yii framework trying to learn a little bit more

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:58:49+00:00Added an answer on May 27, 2026 at 1:58 am

    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):

        options = $.extend({
            type: 'GET',
            url: $.fn.yiiGridView.getUrl(id),
            success: function(data,status) {
                $.each(settings.ajaxUpdate, function(i,v) {
                    var id='#'+v;
                    $(id).html( $( data ).children() ); // was: $(id).replaceWith($(id,'<div>'+data+'</div>'));
                });
                if(settings.afterAjaxUpdate !== undefined)
                    settings.afterAjaxUpdate(id, data);
                $('#'+id).removeClass(settings.loadingClass);
                $.fn.yiiGridView.selectCheckedRows(id);
            },
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have recently started using Vim as my text editor and am currently working
I recently started using WPF and the MVVM framework, one thing that I have
I have recently started using ASP.Net MVC 3 RC 2 and have attempted to
I have recently started using Zend Framework. I started developing on my local XAMPP
Ive recently started using CodeIgniter as I was searching for a very lightweight framework
I've recently started using Gradle and replacing my existing Maven-based projects. I have had
I have recently started using PlayN for a hobby project and has now stumbled
I have recently started using R and am still getting used to its data
I have recently started using the -Wall compiler switch in an attempt to improve
I recently started using Eclipse IDE and have read at a number of places

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.