#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    2
    Rep Power
    0

    Image disappears in IE but works OK in all other browsers


    I have created a small html file which demonstrates the problem I am having in a larger website, but if we can fix this small one, hopefully the same fix will work in the larger one!
    Here is my HTML code (I have made the small amount of CSS inline):

    <!DOCTYPE html><html><head></head>
    <body>
    <p>
    <img style="clear: both;float:left; " src="YourLogoHere.jpeg" alt="Your Logo Here" border="0" width="96px" height=auto>
    <h5>Thank you for supporting</h5>
    <h5>Your School's Name Here</h5>
    </body></html>

    The jpeg called "YourLogoHere.jpg" which is in the same folder as this file is not visible when viewed in IE 7 or 8 (not sure about 9).

    But it appears perfectly in all versions of Firefox, Chrome and Safari.

    Can anybody tell me why?
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    119
    Rep Power
    32
    Looking at your code I would say it is your height: auto; that is causing you the problem in IE8 and below, move it into your CSS instead and see if that helps, or remove it all together as the height should be auto based on a width if a specific height is not set anyway (though who can guarantee anything in IE ).

    If you put it into your CSS and you still have a problem, try
    Code:
    height:auto !important;
    Also, remove your border=0 and style that in your CSS as well, using
    Code:
    img {
      border: none;
    }
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    2
    Rep Power
    0

    Thank you


    Thanks. Following your various instructions, it now works!

    Much appreciated. Philip

IMN logo majestic logo threadwatch logo seochat tools logo