CSS IE Bugs

Discussion in 'CSS' started by gimcrack, Sep 10, 2011.

  1. #1
    Having a problem with some CSS coding. Got it working in Firefox & Chrome, but not in IE. Can you help me narrow the problem, so it will work in IE also. Many Thanks.

    The website is openshoppc.comyr.com
     
    gimcrack, Sep 10, 2011 IP
  2. WebPageMistakes

    WebPageMistakes Well-Known Member

    Messages:
    91
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    110
    #2
    
    #main {
        background-image:url('images/Pettern02.jpg');
        background-repeat: repeat;
        color: tan;
        width:950px;
        margin: 0 0 0 300px;
        text-align: left;
        padding: 10px;
    }
    
    Code (markup):
    Take out the margin property you have and replace with margin-left: auto; margin-right: auto; so the main content of the page is centered like the nav bar and header.

    What else is wrong?
     
    WebPageMistakes, Sep 10, 2011 IP
  3. gimcrack

    gimcrack Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for your responce WebPageMistakes. But, that didn't do the trick. It shift far left & didn't center up.I even try margin-left: 0 auto; and margin-right: 0 auto; with display: block; and that didn't do the trick either.Hope you have other suggestions; and thanks for your help.
     
    gimcrack, Sep 11, 2011 IP
  4. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #4
    Your doctype is old and putting IE into quirks mode. Use this one:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
     
    drhowarddrfine, Sep 11, 2011 IP
  5. gimcrack

    gimcrack Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks drhoarddrfine. That did the trick. I guess it wasn't a IE bug. It's just how you write out the CSS Style scripts. Thanks a million, I was pounding my head on this one. And thanks again to WebPageMistakes to correct my margin.
     
    gimcrack, Sep 11, 2011 IP