www.webdeveloper.com
Results 1 to 5 of 5

Thread: [RESOLVED] IE not displaying my images?

  1. #1
    Join Date
    Feb 2009
    Posts
    5

    resolved [RESOLVED] IE not displaying my images?

    Hey. I have rollover buttons on my website. So I have the normal button image there, and the rollover one right on top of it. By default, it's set to invisible, and it is only visible in hover. This is my CSS code:

    Code:
    ul#nav li a span {
    	visibility: hidden;
    }
    
    ul#nav li a:hover span {
    	visibility: visible;
    }
    And the HTML:
    HTML Code:
        <ul id="nav">
        	<li><a href="http://google.com/" id="nav1"><span><img src="images/nav1_hover.png" alt="Page 1" /></span></a></li>
            <li><a href="http://google.com/" id="nav2"><span><img src="images/nav2_hover.png" alt="Page 2" /></span></a></li>
        </ul>
    Now... this works fine in Firefox. But in IE, it's fine until I scroll over the image, and it comes up with broken image picture. Did I do something wrong?

    EDIT:
    The original images are specified in #nav1 and #nav2. They work fine.
    Last edited by hndda; 02-07-2009 at 12:57 AM.

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Works in IE7

    Why the span?

  3. #3
    Join Date
    Feb 2009
    Posts
    5
    Oh wow nevermind. It's because the extension (png) was capitalized and in the CSS it wasn't. I didn't think that'd effect anything.

    And if I didn't use a span, wouldn't the normal images not show up either. i needed a way to give that property to only the hover ones.

  4. #4
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Code:
    ul#nav li a img {
    	visibility: hidden;
    }
    
    ul#nav li a:hover img {
    	visibility: visible;
    }

  5. #5
    Join Date
    Feb 2009
    Posts
    5
    Oh yea... because the normal ones are in the ID tag, not IMG.

    Thanks! (resolved)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles