• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
why is my html fragment floating to the top of the page?

#1
[eluser]bill19[/eluser]
Hello everyone,

I am working with codeigniter 2.1 and twitter bootstrap to develop a site. I used php's domdocument to generate some dynamic html which I want to insert into a page.Unfortunately , the php generated fragment is now the first thing on the page when I look at the html source:

Code:
<div><h2>Available Now:</h2></div>
mod: 1mod: 2<div class="row"><div class="span6"><h2>13 mole st</h2><p>Fugazi</p><p><a class="btn" href="http://localhost/bootstrap1/index.php/template_controller/1">Learn More &raquo;</a></p></div><div class="span6"><h2>11 mole st</h2><p>Fugazi</p><p><a class="btn" href="http://localhost/bootstrap1/index.php/template_controller/2">Learn More &raquo;</a></p></div></div>

---------generated fragment is above

<!DOCTYPE html>
&lt;html lang="en"&gt;&lt;head>

I actually want to insert this further down the page, after the hero-unit view as you can see in my controller code.

my controller is as follows:

Code:
public function index()
        {
              
              
                $this->load->view('header'); // static HTML including doctype declaration
                $this->load->view('navbar'); // static HTML
                $this->load->view('hero_unit'); // static HTML
              
                $this->currentItems();  // my generated HTML ( which we are discussing )
            
                $this->load->view('footer'); // static HTML
                      
              
        }

What am I doing wrong?

Thanks,

Bill


Messages In This Thread
why is my html fragment floating to the top of the page? - by El Forum - 07-19-2012, 06:17 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.