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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Themes /

Discuss SilverStripe Themes.

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

Problem with layout in IE

Go to End

3 Posts   2518 Views


Community Member, 3 Posts

4 November 2009 at 12:55pm

I am experiencing problem with the layout of my site in IE.

I suspect the first few lines of the HTML is doing all the damage.

View source gives me this:
3 <html >
4 <head>

While my file looks like this:

2 <html >
3 <head>

Running the page through a w3c validation gives me this info:

Byte-Order Mark found in UTF-8 File.

The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause problems for some text editors and older browsers. You may want to consider avoiding its use until it is better supported.

Line 1, Column 1: character "" not allowed in prolog

So for whatever reason a BOM character is prefixed to my HTML document and I can't get rid of it.

I've tried all sorts of things including:

- adding ContentNegotiator::disable(); to _config.php
- making sure the .ss-file is saved in ANSI-encoding
- added <?xml version="1.0" encoding="utf-8"?> to the top of the .ss-file
- removing the doctype entirely

Nothing helped.

Some help would be very much appreciated at this point :-)

Best regards, Soren


Community Member, 3 Posts

4 November 2009 at 1:54pm

I got some great help on the IRC channel. A guy named, DesignCity told my to convert all .php-files and .ss-files to UTF-8 without BOM. I did this by using the format menu in Notepad++ and it did the trick.

Thanks, DesignCity!!


Community Member, 3 Posts

26 July 2010 at 4:09pm

You are a gentleman as well as a scholar. We could not figure out this issue on one of our pages. We were getting a blank space above our header and the error "character "?" not allowed in prolog" in a W3 validation. We went through everything and finally after googling stumbled up against this and our troubles are over. Thanks a million :)