IE ignoring page background and links

Discussion in 'Web Design and Development' started by chad.hassler, Jun 18, 2009.

  1. chad.hassler macrumors newbie

    Joined:
    Jun 18, 2009
    #1
    Hi,
    I am developing my website using Dreamweaver CS3. I have put a black background with some rollover links within the <style> tag. They work great in Firefox, Safari, Opera, but IE just gives me the standard blue underlined links and a white background. Any ideas on why this is happening.

    Thanks
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    Can you post some code you're using? Be sure to use the code (button with #) and the HTML (button with <>) markup when posting to make it more readable. Also, what version of IE are you having trouble with?
     
  3. chad.hassler thread starter macrumors newbie

    Joined:
    Jun 18, 2009
    #3
    I have tried it on 7 and 8. I haven't tried anything older.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title></title>
    <style type="text/css">
    <!--
    a:link {
    	color: #000000;
    	text-decoration: none;
    }
    a:visited {
    	text-decoration: none;
    	color: #000000;
    }
    a:hover {
    	text-decoration: none;
    	color: #6B7711;
    }
    a:active {
    	text-decoration: none;
    	color: #000000;
    }
    .style4 {
    	font-family: "Times New Roman", Times, serif;
    	font-size: 24px;
    }
    body {
    	background-color: #000000;
    }
    .style6 {font-family: "Century Gothic", Geneva, sans-serif}
    .style7 {font-size: 14px}
    .style8 {
    	font-family: "Gill Sans Light", "Century Gothic", Geneva, sans-serif;
    	font-size: 18px;
    }
    .style9 {font-size: 24px}
    a {
    	font-family: Century Gothic, Geneva, sans-serif;
    }
    -->
    </style>
    </head>
    
    <body>
    <table width="850" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
      <tr>
        <td height="123" colspan="2" valign="top"><div align="center"> <br />
          <table width="50%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td valign="top"><div align="center"><a href="home.html"><img src="images/MoodysM.jpg" width="100" height="98" border="0" /></a></div></td>
                <td><div align="center"><img src="images/MoodysAuthenticFresh.jpg" width="262" height="108" /><span class="style8">   </span></div></td>
              </tr>
            </table>
            <hr align="center" width="65%" size="2" />
            <span class="style6"><a href="about.html">about</a> • <a href="farm.html">the farm</a> • <a href="products.html">products</a> • <a href="retail.html">retail stores</a>  • <a href="delivery.html">delivery</a> • <a href="custom.html">processing</a></span><br />
            <hr align="center" width="65%" size="2" />
            </div></td>
      </tr>
      <tr>
        <td width="33%" align="right" valign="top"> </td>
        <td width="67%" valign="top"><blockquote>
            <p class="style4"> </p>
          </blockquote></td>
      </tr>
    </table>
    </body>
    </html>
    
     
  4. Cabbit macrumors 68020

    Cabbit

    Joined:
    Jan 30, 2006
    Location:
    Scotland
    #4
    Some of the properties are not ended within your style tag, close them up with ; like the others and see if that sorts out your issues.
     
  5. chad.hassler thread starter macrumors newbie

    Joined:
    Jun 18, 2009
    #5
    I am not sure which ones you are talking about. Can you explain further?
     
  6. Cabbit macrumors 68020

    Cabbit

    Joined:
    Jan 30, 2006
    Location:
    Scotland
    #6
    Read though your code and spot the odd one(s) out.
     
  7. chad.hassler thread starter macrumors newbie

    Joined:
    Jun 18, 2009
    #7
    I am still not following you. I am assuming you mean between the <style> tags, right? If so, I don't see anything that isn't closed. Sometimes they close out on the next line. That isn't what you are talking about is it?
     
  8. Cabbit macrumors 68020

    Cabbit

    Joined:
    Jan 30, 2006
    Location:
    Scotland
    #8
    As i said within your style tags you have one or many elements that are not closed with a ;
     
  9. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #9
    The last property within the {} doesn't require the ; at the end of it.
     
  10. chad.hassler thread starter macrumors newbie

    Joined:
    Jun 18, 2009
    #10
    Okay, I have fixed those. Sorry I was confused. I overlooked the ;

    It still isn't working right though. Any other ideas?
     
  11. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #11
    I took the code and ran it in IE6 and it looks like it does in Firefox. The links have the proper coloring for the hover and active state as well. It's possible yours is using a partially cached version of the page.
     

    Attached Files:

  12. chad.hassler thread starter macrumors newbie

    Joined:
    Jun 18, 2009
    #12
    I have tried it on two different computers. One with IE 7 and one with 8. They both do the same. I have refreshed them several times. Does IE 7 and 8 read CSS differently than other browsers?
     
  13. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #13
    Yes, but usually better ;)

    The only other thing I can think of is that it doesn't like the HTML comment around the styles e.g., <!-- --> Try removing those lines to see if it has an effect.
     
  14. chad.hassler thread starter macrumors newbie

    Joined:
    Jun 18, 2009
    #14
    Yeah, I tried that before I even posted this thread and all it does is puts everything within <style></style> at the top of the screen.
     
  15. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #15
    Really? I don't have that issue when I try it. I never use the comment tags like that, but have seen others do it. It's actually only needed for very old browsers.
     
  16. chad.hassler thread starter macrumors newbie

    Joined:
    Jun 18, 2009
    #16
    Are you checking it on a Mac version of IE or a PC version?
     
  17. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #17
    Windows XP IE6. I don't get to use a Mac at work anymore unfortunately.
     
  18. Karasu macrumors newbie

    Joined:
    Aug 11, 2008
    #18
    Could it be the span tag that's right in front of the anchor links? Could IE7 and 8 be looking for something like ".style6 a:hover" in the stylesheet?
     
  19. chad.hassler thread starter macrumors newbie

    Joined:
    Jun 18, 2009
    #19
    I got it fixed. I had left out part of the code when I copied it onto the thread and there was a meta tag that had not be closed. It works fine now. Thanks for all of your help.
     

Share This Page