Jump to:

1384 Posts in 493 Topics by 522 members

Themes

SilverStripe Forums » Themes » Problem with layout in IE

Discuss SilverStripe Themes.

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

Page: 1
Go to End
Author Topic: 1927 Views
  • hylle
    Avatar
    Community Member
    3 Posts

    Problem with layout in IE Link to this post

    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

  • hylle
    Avatar
    Community Member
    3 Posts

    Re: Problem with layout in IE Link to this post

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

  • itsmeee
    Avatar
    Community Member
    3 Posts

    Re: Problem with layout in IE Link to this post

    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

    1927 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.