• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] <div> starting in header template and ending in footer template

#11
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.
Reply

#12
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.
Reply

#13
Smile 
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.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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