SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Apr 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Compatibility with IE

    Hi this is the first time I have built a site and I'm having problems with my divs aligning in Internet Explorer, Safari, Firefox and google chrome are all fine.

    Here's my site.

    http://www.top-farm.info/index.html


    I've sourced the below code as a recommended fix to insert in the head section under title

    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>

    or

    <meta http-equiv="X-UA-Compatible" content="IE8"/>

    But neither has worked. Any help would be much appreciated, thanks in advance,

    Tom

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Here is the problem. You are throwing IE into quirks mode. Second, you are using XHTML syntax but you are telling the browser you are using old broken HTML 4...What? http://validator.w3.org/check?verbos...o%2findex.html
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    SitePoint Member
    Join Date
    Apr 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, thanks for your reply I used this website yesterday to try and fix some errors, but didn't understand some of the feedback, I'm using quite an old version of Dreamweaver and the head section automatically generated the HTML 4.01 presumably this is wrong.

    Should I remove

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>

    and replace with:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

    do I need also need to remove:

    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>

    Thanks
    again

  4. #4
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    6,153
    Mentioned
    262 Post(s)
    Tagged
    5 Thread(s)
    I see you've changed your doctype - has that solved your problem? (I can't test on IE just now.)

    You should certainly remove this: <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/> as it's telling all versions of IE to emulate IE7, which had/has all kinds of problems. You really don't want that.

    You might want to run your page through the W3C Validator, to pick up a few errors there. It's always a good idea to validate your code, as it helps to ensure it will display correctly in any browser. Valid code is not always enough, unfortunately, but it's a darned good starting point.

    If you need any help interpreting the Validator results, just ask.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •