Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Problems with Browser Compatibility (Internet Explorer – typical!)

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #36444
    daraclare
    Member

    Hi folks, I’m hoping to get some advice on Browser Compatibility as I’m having problems with how my site looks on Internet Explorer, especially the older versions. I have checked browser compatibility in Dreamweaver and validated the css with W3’s code validator but the body of the text is off to the left in IE 7 and 8 and the background image doesn’t show up at all in IE 6 — it’s a nightmare, I’d love to just pretend nobody uses IE anymore but I guess I can’t.

    Can anyone suggest somewhere/ a tool that will help me figure out the CSS (or HTML?) that’s causing the problem?

    I’ll show the current CSS below, I hope that’s okay:

    @charset "UTF-8";
    /* CSS Document */

    a, body, figure, h1, header, li, nav, p, section, span, u {
    background:transparent;
    border:0 none;
    font-size:100%;
    margin:0;
    border:0;
    vertical-align:top;
    padding-top: 5px;
    padding-right: 0;
    padding-bottom: 0;
    }


    ol, ul {
    list-style:none;
    background:transparent;
    border:0 none;
    font-size:100%;
    margin:0;
    border:0;
    vertical-align:top;
    padding-top: 0px;
    padding-right: 0;
    padding-bottom: 0;
    }

    ul.b {
    list-style-type:square;
    font-family:Arial, Helvetica, sans-serif;
    padding-bottom:2px;
    padding-left:10px;
    }


    .col1, .col2 {float:left}

    .col1 {
    width:500px;
    height:495px;
    }

    .col2 {
    width:320px;
    padding-top:100px;
    height:300px;
    padding-left:30px;
    }


    article, figure, footer, header, nav, section {display:block}
    .left {float:left}
    .right {float:right}
    .wrapper {width:100%;overflow:hidden}
    body {
    background:url(../images/mugendo-kickboxing-maynooth.jpg) top center no-repeat;
    border:0;
    font:13px 'Nixie One', cursive;
    color:#000000;
    line-height:20px;
    }

    .main {
    margin:0 auto;width:960px}

    .extra {
    height:auto !important;
    height:100%;
    margin:0
    }

    a {
    color:#383838;
    text-decoration:underline;
    }
    a:hover {
    text-decoration:none;
    color: #990000;
    }

    h1 {
    font-size:26px;
    color:#000;
    line-height:34px;
    padding:18px 0 9px 0;
    letter-spacing:-1px;
    font-weight: 500;
    }

    h1 span {
    color:#990000
    }

    h1 a:link {text-decoration:none;}
    h1 a:visited {text-decoration:none;}
    h1 a:hover {text-decoration:underline;}
    h1 a:active {text-decoration:underline;}

    h3 {
    font-size:11px;
    color:#990000;
    vertical-align:top;
    text-decoration:none;
    font-weight:lighter;
    padding-top:10px;

    }

    p {
    padding-bottom:10px;
    font-family: Arial;
    }
    /* header */
    header {height:276px;width:100%;overflow:hidden}
    #menu {width:100%;overflow:hidden;padding-top:33px; padding-left:400px;}
    #menu li {float:left;padding-right:23px;margin-right:22px;background:url(../images/pipe.gif) right top no-repeat}
    #menu .bg_none {background:none}
    #menu li a {
    font-size:18px;
    color:#F2B735;
    line-height:28px;
    text-decoration:none
    }
    #menu li a:hover, #menu #menu_active a {
    color:#ffffff
    }
    /* content */
    #content {width:100%;overflow:hidden;padding-bottom:9px; padding-top:5px; padding-left:25px;}
    .pad_left1 {
    padding-left:50px;
    }
    .mugendo-icon {margin-right:18px}
    .pad_bot1 {padding-bottom:0px}
    .pad_top1 {padding-top:6px}
    .button {border:1px solid #d9d9d9;display:inline-block;line-height:32px;text-decoration:none; padding:0 15px;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px; position:relative}
    .button:hover {background:#990000;color:#fff;border:1px solid #990000}

    /* footer */
    footer {line-height:8px;padding:10px 0 0px 0;text-align:center; color:#383838;}
    .footer-color {
    color: #990000;
    }
    footer a{text-decoration:none;}

    /* contact */

    #page-wrap {
    width: 500px;
    margin: 20px auto;
    height: auto !important;
    height: 500px;
    }

    #contact-area {
    width: 550px;
    margin-top: 25px;

    }

    #contact-area input, #contact-area textarea {
    padding: 5px;
    width: 375px;
    font-size: 1.4em;
    margin: 0px 0px 10px 0px;
    border: 2px solid #ccc;
    }

    #contact-area textarea {
    height: 90px;
    }

    #contact-area textarea:focus, #contact-area input:focus {
    border: 2px solid #900;
    }

    #contact-area input.submit-button {
    margin-left: 404px;
    width: 100px;
    float: none;
    }

    label {
    float: left;
    text-align: right;
    margin-right: 15px;
    width: 100px;
    padding-top: 5px;
    font-size: 1.4em;
    }

    Any advice is much appreciated, D

    #95877

    I cannot name a tool, but I think it helped, if you make the css clean.
    It is hard to tell w/o the html shown here, but I see a few things, that probably cause some problems:

    body should have line-height: 1em, because this affects all elements in the page not only text-elements.
    #content and #menu have width:100% AND a padding-left-definition, which means a window-scrollbars will likely appear…
    label is an inline-element. if you want the styles to take effect (padding, width) you need to make it a block-element.

    basically: if you have clean and valid html + css, it should look good in all major browser. BUT css validator tools only validate against the standard, they don’t outline common ‘mistakes’.

    hope this helps.

    #95880
    daraclare
    Member

    That’s great, really appreciate the input. I will try this and post again.

    Cheers, D

    #95848
    daraclare
    Member

    Hi again, I have changed the above suggestions. I will post my amended css below. I’m using http://browsershots.org to view the site in IE as I’m on a mac – does anyone have a better suggestion? It’s very slow.

    Thanks again.

    CSS:

    @charset "UTF-8";
    /* CSS Document */

    a, body, figure, h1, header, li, nav, p, section, span, u {
    background:transparent;
    border:0 none;
    font-size:100%;
    margin:0;
    border:0;
    vertical-align:top;
    padding-top: 5px;
    padding-right: 0;
    padding-bottom: 0;
    }


    ol, ul {
    list-style:none;
    background:transparent;
    border:0 none;
    font-size:100%;
    margin:0;
    border:0;
    vertical-align:top;
    padding-top: 0px;
    padding-right: 0;
    padding-bottom: 0;
    }

    ul.b {
    list-style-type:square;
    font-family:Arial, Helvetica, sans-serif;
    padding-bottom:2px;
    padding-left:10px;
    }


    .col1, .col2 {float:left}

    .col1 {
    width:500px;
    height:495px;
    }

    .col2 {
    width:320px;
    padding-top:100px;
    height:300px;
    padding-left:30px;
    }


    article, figure, footer, header, nav, section {display:block}
    .left {float:left}
    .right {float:right}
    .wrapper {width:100%;overflow:hidden}
    body {
    line-height:1em;
    background:url(../images/mugendo-kickboxing-maynooth.jpg) top center no-repeat;
    border:0;
    font:13px 'Nixie One', cursive;
    color:#000000;
    line-height:20px;
    }

    .main {
    margin:0 auto;width:960px}

    .extra {
    height:auto !important;
    height:100%;
    margin:0
    }

    a {
    color:#383838;
    text-decoration:underline;
    }
    a:hover {
    text-decoration:none;
    color: #990000;
    }

    h1 {
    font-size:26px;
    color:#000;
    line-height:34px;
    padding:18px 0 9px 0;
    letter-spacing:-1px;
    font-weight: 500;
    }

    h1 span {
    color:#990000
    }

    h1 a:link {text-decoration:none;}
    h1 a:visited {text-decoration:none;}
    h1 a:hover {text-decoration:underline;}
    h1 a:active {text-decoration:underline;}

    h3 {
    font-size:11px;
    color:#990000;
    vertical-align:top;
    text-decoration:none;
    font-weight:lighter;
    padding-top:10px;

    }

    p {
    padding-bottom:10px;
    font-family: Arial;
    }
    /* header */
    header {height:276px;width:100%;overflow:hidden}
    #menu {overflow:hidden;padding-top:33px; padding-left:400px;}
    #menu li {float:left;padding-right:23px;margin-right:22px;background:url(../images/pipe.gif) right top no-repeat}
    #menu .bg_none {background:none}
    #menu li a {
    font-size:18px;
    color:#F2B735;
    line-height:28px;
    text-decoration:none
    }
    #menu li a:hover, #menu #menu_active a {
    color:#ffffff
    }
    /* content */
    #content {overflow:hidden;padding-bottom:9px; padding-top:5px; padding-left:25px;}
    .pad_left1 {
    padding-left:50px;
    }
    .mugendo-icon {margin-right:18px}
    .pad_bot1 {padding-bottom:0px}
    .pad_top1 {padding-top:6px}
    .button {border:1px solid #d9d9d9;display:inline-block;line-height:32px;text-decoration:none; padding:0 15px;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px; position:relative}
    .button:hover {background:#990000;color:#fff;border:1px solid #990000}

    /* footer */
    footer {line-height:8px;padding:10px 0 0px 0;text-align:center; color:#383838;}
    .footer-color {
    color: #990000;
    }
    footer a{text-decoration:none;}

    /* contact */

    #page-wrap {
    width: 500px;
    margin: 20px auto;
    height: auto !important;
    height: 500px;
    }

    #contact-area {
    width: 550px;
    margin-top: 25px;

    }

    #contact-area input, #contact-area textarea {
    padding: 5px;
    width: 375px;
    font-size: 1.4em;
    margin: 0px 0px 10px 0px;
    border: 2px solid #ccc;
    }

    #contact-area textarea {
    height: 90px;
    }

    #contact-area textarea:focus, #contact-area input:focus {
    border: 2px solid #900;
    }

    #contact-area input.submit-button {
    margin-left: 404px;
    width: 100px;
    float: none;
    }

    label {
    display:block;
    float: left;
    text-align: right;
    margin-right: 15px;
    width: 100px;
    padding-top: 5px;
    font-size: 1.4em;
    }
    #95883
    daraclare
    Member

    Actually I will aslo post my HTML if that’s okay:




    Title



















     



    Mugendo Maynooth Kickboxing


    Welcome to the official website of Mugendo Maynooth. Mugendo Kickboxing as a martial art can grow with your evolving needs, whether you are initially looking to improve your fitness, learn self-defence or interested in competing, then Mugendo Kickboxing should be seriously considered.


    As you grow in confidence with this martial art why not get into the ring for some light or semi-contact sparring. Then in time you may choose to compete at light, semi or even full contact kickboxing as many others have done before.


    For more information browse this site and please feel free to get in contact.


    Read More


    Find Mugendo on Facebook




    Join Mugendo Maynooth Kickboxing Club on Facebook



    Keep up with the Mugendo Maynooth Kickboxing's latest news on facebook and keep in touch with other Mugendo club members in Ashbourne, Chanel College in Coolock and Maynooth.

















    #96043
    daraclare
    Member

    HTML5 enabling script! It worked! My site now looks sound on IE9 and previous. Delighted!

    #96050
    dfogge
    Participant

    for debugging IE quickly check out http://browserstack.com

    i cant recommend this strongly enough. its not free, but trust me its worth it!

    #96063
    daraclare
    Member

    Doesn’t look bad, thanks!

    #96308

    So, problem solved?

    Here’s a useful library I often use: http://html5boilerplate.com/
    It sets back CSS and comes with Modernizr for HTML5 enabling, and much more.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘CSS’ is closed to new topics and replies.