SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2010
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Layout floats to the left in IE7

    hello everyone,

    i have centered my layout using margin: 0 auto;
    This looks fine on ff and chrome, however it is different on ie. I suspect that it is because i have some floated elements in the layout, but i am not positive.

    here is the link: http://bestofgy1.kkinc.org/

    Anyone got an idea of what's happening? Any tip is appreciated: Thank you:

  2. #2
    Ripe Tomatos silver trophybronze trophy Rayzur's Avatar
    Join Date
    Jun 2007
    Location
    Texas
    Posts
    4,174
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    You have an improper doctype and it is throwing IE into quirks mode.

    Learn more about doctypes

    I would recommend HTML 4.01 Strict
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">

  3. #3
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    As Ray pointed out, an improper doctype is causing this. Without a proper doctype IE gets thrown into quirks mode which makes it behave more like IE5, and EI5 doesn't support auto margins
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  4. #4
    SitePoint Enthusiast
    Join Date
    Mar 2010
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you guys. I have been so frustrated by this.


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
  •