CodeIgniter Forums
Spaces before and after template inclusion - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Spaces before and after template inclusion (/thread-38576.html)



Spaces before and after template inclusion - El Forum - 02-11-2011

[eluser]Unknown[/eluser]
Hi guys,

I've noticed that whenever I include a template within other templates, line breaks are added in the HTML before and after the template that's been included. This normally doesn't bother me except for in some styling instances where the line breaks add more space around a listing.

If I embed the same chunk of code within the template that I was loading it into, then it's fine (there are no spaces).

I've checked through all my code for rogue spaces, and haven't found any. I was wondering if anyone has come across this before, and how I can remedy it?


Spaces before and after template inclusion - El Forum - 02-11-2011

[eluser]InsiteFX[/eluser]
Make sure that any php statements have no spaces after the ;?> tags

It could also be your code editor inserting them.

InsiteFX