treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Background color wont work in ie6 specific style sheet?

  • On
    http://graphicstack.com/a/jay/contact/

    I tried the page in Adobe Browser Lab with ie6.

    The background image would not appear...

    I gave it an ie6 or below specific style sheet with a background:black; just to make sure it was picking up on things and that wouldnt work.. any ideas?
    thanks
  • also... why would all nearly all of the text on the site be RED in ie 7 and below... whats that about?
  • <!--[if lt IE 6]><link href="ie6.css" rel="stylesheet" type="text/css" /><![endif]-->
    This stylesheet is being called by IE versions BEFORE IE6 (if lt IE 6 = if less than ie6), so IE5.5 and before. Change it into one of these first:

    <!--[if lt IE 7]><link href="ie6.css" rel="stylesheet" type="text/css" /><![endif]-->
    <!--[if IE 6]><link href="ie6.css" rel="stylesheet" type="text/css" /><![endif]-->
    The text is in red because of this code:

    <span class="req">*<span>
    You forgot the slash before the closing span, so IE7 actually interprets that (correctly, actually) by showing everything as part of the "req" class. All other browsers interpreted it as a mistake so they fixed it for you.
  • derr :) thanks!

    any chance you can see why the background image wont show ?
  • Most likely because this line in formcss.css takes precedence:

    background-color: rgba(0, 0, 0, 0.35) !important;
    The !important tag just keeps overriding the background declaration in IE6.
  • i removed it but in adobe browser lab ie6 the background is still white
  • Don't have IE6 handy here to test, but maybe try to change

    background: black;
    into:

    background-color:#000; background-image:none;
    Just a wild guess.
  • Actually, I just tried it with IE6 in IEtester and the form background looks pretty black there.
  • I wouldn't always trust the Browser Lab. If you're doing this professionally, I recommend either signing up at BrowserStack or setting up a few dedicated local Windows instances.