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
    May 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Internet Explorer IE not reading background-image: url ()

    I'm in the middle of making a template went to check it and noticed i get a blank page in IE but FF reads it correctly (go figure). Would love to know if there is a CSS fix for this. live page

    CSS
    Code:
    Body {background-color: #FFFFFF}
    .-Banner {background-image: url(images/banner.jpg)} 
    .-MainBackground {background-image: url(images/background.jpg)} 
    .-LowerBackground {background-image: url(images/bottom.jpg)}
    PAGE
    <?xml version="1.0" encoding="iso-8859-1"?>
    <!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>
    <title>Lulevitt Financial Realty Developments</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link href="lulevitt.css" rel="stylesheet" type="text/css" />
    </head>

    <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <div align="center">
    <table width="900" height="620" border="0" cellpadding="0" cellspacing="0" class="-MainBackground">
    <tr>
    <td height="80" colspan="2" class="-Banner">&nbsp;</td>
    </tr>
    <tr>
    <td width="80" height="600" valign="top">&nbsp;</td>
    <td width="836" valign="top">&nbsp;</td>
    </tr>
    <tr>
    <td height="20" colspan="2" class="-LowerBackground">&nbsp;</td>
    </tr>
    </table>
    </div>
    </body>
    </html>

  • #2
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    Is there a good reason why your class-names start with a hyphen? Wouldn't surprise me if that was the issue...

  • #3
    New to the CF scene
    Join Date
    May 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    no not really just wanted them on the top of my css list in DW

  • #4
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,304
    Thanks
    28
    Thanked 276 Times in 270 Posts
    Try removing the hyphens. Browsers behave differently when you use anything other than the 36 alphanumeric characters to name or reference classes. Also, remove the XML prolog; it throws Internet Explorer into quirks mode and isn't necessary. The xmlns attribute isn't necessary either.

    If you really have an issue with CSS markup formatting, edit it manually. The editor should respect your changes... At least Adobe GoLive CS2 does for me.
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  

    Posting Permissions

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