CodeIgniter Forums
[SOLVED] <div> starting in header template and ending in footer template - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: [SOLVED] <div> starting in header template and ending in footer template (/showthread.php?tid=71216)

Pages: 1 2


RE: &lt;div&gt; starting in header template and ending in footer template - John_Betong - 07-22-2018

Meanwhile create .hhh CSS element with display:none; and use it to hide the div or another CSS element .bd1 set to outline: solid 2px red; because it will highlight the div without affecting rendering. Using border introduces space which could create another problem.


RE: <div> starting in header template and ending in footer template - dave friend - 07-24-2018

I want to make sure I understand. You supply the following

Code:
<html>
    <head>
        <title>CodeIgniter Tutorial</title>
    </head>
    <body>
        <div>
            <h1><?php echo $title; ?></h1>

<!--footer template-->
            <em>&copy; 2015</em>
        </div>

        <div>
        </div>
    </body>
</html>

But it renders as

Code:
<html>
    <head>
        <title>CodeIgniter Tutorial</title>
    </head>
    <body>
        <div>
            <h1><?php echo $title; ?></h1>

<!--footer template-->
            <em>&copy; 2015</em>

        <div>
        </div>
        </div>
    </body>
</html>

Is that right?

There isn't any way that CodeIgniter would cause this to happen. I have to guess you have some code you're not showing and in that code there is a <div> that isn't closed. The magically appearing closing tag is being supplied by the browser.


RE: <div> starting in header template and ending in footer template - misterSerious - 07-29-2018

Quote:Is that right?

There isn't any way that CodeIgniter would cause this to happen. I have to guess you have some code you're not showing and in that code there is a <div> that isn't closed. The magically appearing closing tag is being supplied by the browser.


You were right dave friend! I did have a <div> that wasn't closed somewhere within my code. 

Thank you and everyone else who tried to help me here.