Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Totally stuck with an IE7 CSS bug...

    Hi all,

    I'm working on this website - http://www.ecruprint.com - which is a custom skin for the e-commerce site Big Cartel.

    Forgive the messy CSS files, I will be cleaning them up later!

    I'm trying to debug for IE7, and have a weird bug where the CSS width is not being obeyed.

    This is the code for one of my main divs:

    Code:
    #main-content {
    margin:0 auto;
    width:940px;
    overflow:hidden;
    text-align:center;
    }
    This results in perfect layout in Chrome, FF and Safari, but Explorer seems to ignore the width and spits it out as 537px instead!

    I've been using DebugBar in Explorer to try and work out what's going on, and that's what gave me the the 537px figure. I really have no clue what's going on here, and I'd really appreciate any ideas.

    Many thanks

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,746
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello faboon,
    You have no DocType? Can hardly expect IE to get it even close without one. See the links in my signature line, DocType and Validation will both help you.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,746
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    In sexy.css:
    Code:
    /* Content -------------------------------------------------*/
    
    
    * html #main-content {
      width: 557px;
      width: 537px;
      }
    
    
    
    /*============================================================
     Navigation
    ============================================================*/
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    faboon (11-23-2011)

  • #4
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Yeah I've spotted that bit of code now - a simple search for "537px" in my CSS would've been a good start!

    Thanks for the reply - this project is far from finished so I'll be looking at DocType and validation soon, thanks for the links.


  •  

    Tags for this Thread

    Posting Permissions

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