Help with the img width property and IE6

  • kalechibki
  • Born
  • Born
  • kalechibki
  • Posts: 2

Post 3+ Months Ago

Hey all

This seems like one of those freak web designer nightmares - when you can't figure out why the hell something is going wrong!

I have the following code in my page:
Code: [ Select ]
<style type="text/css">
<!--
    #bckgrd {position: absolute; left: 0; top: 0; z-index: 1; }
-->
</style>
.
.
.
<div id="bckgrd">
    <img src="images/background.jpg" width="100%" height="100%" border="0">    
</div>
  1. <style type="text/css">
  2. <!--
  3.     #bckgrd {position: absolute; left: 0; top: 0; z-index: 1; }
  4. -->
  5. </style>
  6. .
  7. .
  8. .
  9. <div id="bckgrd">
  10.     <img src="images/background.jpg" width="100%" height="100%" border="0">    
  11. </div>


The first block is in the head, and the second is in the body tags. For the full page Click here

Anyway, it works in Mozilla (the netscape engine). However, IE hates it. In fact, it hates it so much that it doesn't even show the background image!

Please help! :?:

Peace out :flame:

Kale

Note: The reason there's a blank space in the upper left is because the company's logo is supposed to be there. However, due to the confidentiality agreement, I can't show it.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

I think IE is looking at this,
Code: [ Select ]
<img src="images/background.jpg" width="100%" height="100%" border="0">

& thinking ok 100% of the width & height of the div that it's in.
Then IE says hmmm, there is no width & height for this div :scratchhead:
  • kalechibki
  • Born
  • Born
  • kalechibki
  • Posts: 2

Post 3+ Months Ago

I wish I had a prize to give you!

Thanks a bunch - you were right.

Peace out :flame:

Kale

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 16 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.