CodeIgniter Forums

Full Version: Spaces before and after template inclusion
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

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?

El Forum

Make sure that any php statements have no spaces after the ;?> tags

It could also be your code editor inserting them.