Results 1 to 2 of 2

Thread: Problems with image height in IE

  1. #1
    Join Date
    Apr 2010
    Posts
    2

    Unhappy Problems with image height in IE

    I am putting together a portfolio site. It can be viewed at www.brookeirishdesign.com. The problem is that I am using image swaps on my page. All of the images are the same width, but varying height. Thus, I used the tag "height="relative" for my images so that it does not warp from image to image. This works beautifully in Firefox, Safari, Opera, you name it. However, it does not work AT ALL in Internet Explorer. It simply does not load any of the images, which is a big issue. I also tried "height="auto" to no avail. Any suggestions? Thanks!

  2. #2
    Join Date
    Feb 2006
    Location
    Salisbury UK
    Posts
    4,332
    First of all. add a doctype and html tag above the <head> tag:-
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    You could use the XHTML 1.0 Strict doctype instaed. If you use the HTML 4.01 doctype the closing tag for the img tag should be > not /> and if you use the XHTML doctype the closing tag for the stylesheet link should be /> not > The above doesn't cure the problem, it's just information.

    For the image in IE you need to delete the height for the img tag:-
    Code:
    <div id="apDiv1"><img src="images/dot1.png" width="554" /></div> 
    <!--height="auto" deleted-->
    It then worked in my IE7.
    Code downloaded to my PC will be deleted in due course.
    WIN7; IE9, Firefox, Opera, Chrome and Safari for Windows; screen resolution usually 1366*768.
    Also IE6 on W98 with 800*600 and IE8 on Vista 1440*900.

Tags for this Thread

Posting Permissions

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