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.

Themes /

Discuss SilverStripe Themes.

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

Problem with layout in IE


Reply


3 Posts   1985 Views

Avatar
hylle

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:
1
2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
3 <html >
4 <head>

While my HomePage.ss file looks like this:

1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
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

Avatar
hylle

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!!

Avatar
itsmeee

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 :)