Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Themes /

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Extra space after include


Go to End


3 Posts   1964 Views

Avatar
DanStephenson

Community Member, 116 Posts

18 March 2010 at 10:31am

I am having a very weird issue with a new site I am working on.

When I build the layout, everything works fine. But then if I go and cut my layout into multiple include files (Header, Footer and Sidebar), when I render the new Page.ss template, I am either getting extra space above or below my includes (above in IE, below in a WebKit browser).

In the newest version of SS, it seems to insert comments automatically into my HTML. Could that be affecting something?

I've successfully built many SS templates before, and have never seen this kind of error. Anyone else solved this?

Avatar
lerni

Community Member, 81 Posts

18 March 2010 at 12:10pm

it could be the encoding of the file?

luk

Avatar
bummzack

Community Member, 904 Posts

18 March 2010 at 7:53pm

Maybe it's the whitespace that is rendered as a "blank" line. I have encountered similar issues with IE. Try to set CSS line-height and font-size to zero on the element that wraps the includes. Then of course set line-height and font-size of the inner elements to normal values again.