Getting duplicate tags in output code
Permalink 1 user found helpful
I created a special default template and it worked fine on my localhost, this is the code I used.
Once uploaded to the server it created duplicate <div id="body"> tags that go something like this...
The only thing that corrected it was to remove the tags in the code like thus...
It's kind of an offensive fix and I wouldn't mind knowing where the extra code block is coming from.
<?php defined('C5_EXECUTE') or die("Access Denied."); $this->inc('elements/header.php'); ?> <div id="central"> <div id="left-sidebar"> <?php $as = new Area('Sidebar'); $as->display($c); ?> </div> <div id="body"> <?php $a = new Area('Main'); $a->display($c); ?>
Viewing 15 lines of 25 lines. View entire code block.
Once uploaded to the server it created duplicate <div id="body"> tags that go something like this...
<div id="body"> <div id="body"> the content of the page here... </div> </div>
The only thing that corrected it was to remove the tags in the code like thus...
<?php defined('C5_EXECUTE') or die("Access Denied."); $this->inc('elements/header.php'); ?> <div id="central"> <div id="left-sidebar"> <?php $as = new Area('Sidebar'); $as->display($c); ?> </div> <?php $a = new Area('Main'); $a->display($c); ?> <div id="right-sidebar">
Viewing 15 lines of 23 lines. View entire code block.
It's kind of an offensive fix and I wouldn't mind knowing where the extra code block is coming from.
Thank you, I am definitely going to try that as on having a look around I discovered that it was only doing that on the first 2 pages, so my "fix" left out any styling after that. :(
Update:
Gave that a try and, low and behold, it duplicated the "content" tags.
Further inspection and I discovered that the extra tags were coming in from doing a copy/paste of the content from my localhost site. Boy do I feel foolish now.
Update:
Gave that a try and, low and behold, it duplicated the "content" tags.
Further inspection and I discovered that the extra tags were coming in from doing a copy/paste of the content from my localhost site. Boy do I feel foolish now.
Not quite sure on your duplicate tags, but a body tag is normally under header tag wrapping most things. Also giving the body tag an id or class is not good.
Try giving inner content a different name: 'content', 'inner' or 'middle' and then obviously change your CSS to suit.
That should work.