By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,880 Members | 1,817 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,880 IT Pros & Developers. It's quick & easy.

IE7 rendering problem for image UL list navigation

P: 1
Hi everyone,

I'm currently having a rendering problem in IE7 (haven't even tried the lower IEs yet), vs. what I see in FF2. The simplified site can be found at solerasd.com . (There are more image elements that belong in the list but I've only posted 2 since it replicates the problem and minimizes the code to read. In FF, you should see a logo with two images (currently not HREF's) of the same size below it, and a copyright statement below the block with the images. In IE, you'll only see the logo and your cursor will disappear if you mouse over the area with the images.

The empty spans with an image background are there for accessibility reasons. Both the CSS and the HTML validate.

I've attempted numerous different ways of addressing the problem, all of which failed - some moved the positions of the images to odd positions, most do nothing. If the float is removed from the "about-us" LI, the images either overlap by the width of "About Us" text, or in the code below only a sliver of the products image shows. I've even managed to have IE7 throw an exception and crash every time I visited the site with some hacks. :)

The height and width attributes are repeated for each LI because when I attempted to move them to a generic LI in the CSS, the height of the list is reduced to the text in FF.

The code below is different than the site but produces the same results. Any help would be MUCH appreciated.

Thanks!

XHTML:
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2.         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4.  
  5. <head>
  6.     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7.     <meta http-equiv="Content-Style-Type" content="text/css" />
  8.     <title>Solera</title>
  9.     <link rel="stylesheet" href="./styles/solera-sliced.css?v=1.1" type="text/css" media="screen" />
  10.     <link rel="shortcut icon" href="./images/solera.ico" type="image/x-icon" />
  11. </head>
  12.  
  13. <body>
  14.  
  15.     <div id="content">
  16.  
  17.         <h1 id="landing-logo">Solera<span /></h1>
  18.  
  19.         <ul id="landing-navlist">
  20.             <li class="about-us">About Us<span /></li>
  21.             <li class="products">Products<span /></li>
  22.         </ul>
  23.  
  24.         <p id="copyright">&copy; Copyright 2008 Solera. All rights reserved.</p>
  25.  
  26.     </div>
  27.  
  28. </body>
  29. </html>
  30.  
CSS:
Expand|Select|Wrap|Line Numbers
  1. html { background-color: #000; }
  2.  
  3. * {
  4.     margin:0pt;
  5.     padding:0pt;
  6. }
  7.  
  8. /*
  9. a { color: #036; text-decoration: none;}
  10. a:hover { color: #09c; }
  11. */
  12. h1,h2,h3,h4, #content h1 a, #content h2 a, #content h3 a { font-weight: normal; color: #fff;}
  13.  
  14.  
  15. body {font: 15px Georgia, "Times New Roman", Times, serif; margin: 0; padding: 0; text-align: center; color: #fff; }
  16. /*
  17. h1, h2, h3 { margin: 0; padding: 0; }
  18.  
  19. p { line-height: 22px; } */
  20.  
  21. #landing-logo {
  22.     margin:0; padding-top:30px;
  23.     position:relative;
  24.     width:865px; height:145px;
  25.     overflow:hidden;
  26. }
  27.  
  28. #landing-logo span {
  29.     display:block;
  30.     position:absolute; left:0; top:0; z-index:1;
  31.     width:865px; height:145px;
  32.     margin:0; padding-top:30px;
  33.     background:url("../images/solera-logo.png") center no-repeat;
  34. }
  35.  
  36.  
  37. ul#landing-navlist {
  38.     list-style:none;
  39.     display:block;
  40.     position:relative;
  41.     overflow:hidden;
  42.     }
  43.  
  44. ul#landing-navlist li {
  45.     display:inline;
  46.     min-width:173px; min-height:378px;  
  47.     }
  48.  
  49. ul#landing-navlist li.about-us {
  50.     float:left;
  51.     background:#000 none repeat scroll 0%;
  52.     position:relative;
  53.     overflow:hidden;
  54.     min-width:173px; min-height:378px;
  55.     }
  56.  
  57. ul#landing-navlist li.about-us span {
  58.     display:block;
  59.     position:absolute; left:0; top:0; z-index:1;
  60.     background:url("../images/about-us.png") center no-repeat scroll 0%;
  61.     min-width:173px; min-height:378px;
  62.     }
  63.  
  64. ul#landing-navlist li.products {
  65.     float:left;
  66.     background:#000 none repeat scroll 0%;
  67.     position:relative;
  68.     overflow:hidden;
  69.     min-width:173px; min-height:378px;
  70.     }
  71.  
  72. ul#landing-navlist li.products span {
  73.     display:block;
  74.     position:absolute; left:0; top:0; z-index:1;
  75.     background:url("../images/products.png") center no-repeat scroll 0%;
  76.     min-width:173px; min-height:378px;
  77.     }
  78.  
  79. p#copyright {
  80.     position:relative;
  81.     text-align:center;
  82.     color:#fff;
  83.     font:9px Verdana, "Trebuchet MS", "Times New Roman", Times, serif;
  84. }
  85.  
  86. #content { margin: auto; text-align: center; width: 865px; height: 650px}
  87.  
Feb 10 '08 #1
Share this Question
Share on Google+
1 Reply


drhowarddrfine
Expert 5K+
P: 7,435
Well, you changed it on us.
Feb 10 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.