tags:

views:

80

answers:

2

hi here's my code (a bit simplified)

<thisIsADiv id="wrapper" style="width:960px; margin:0 auto; position: relative;">
  <img src="img/bg/wrapper.jpg" alt="" width="960" id="bg" style="position:absolute; top:0; left:0; z-index:0; height:100%;" />
  <some more stuff></stuff>
</thisIsADiv >

here's my problem: if i give my image 100% height it works correctly in firefox/chrome (it stretches all allong its wrapper) while in explorer it inherits the page height!! causing an overheighted page. I tried with height=inherit but in firefox/chrome image doesn't stretch at all, in explorer the problem remains the same. Height=auto: the same as above in F/C + explorer doesn't stretch too.

Any idea? Thanks Vitto

A: 

Try setting a height to your wrapper div.

Edit: IE doesn't like z-index: 0; so set that to 1 and adjust your other indexes accordingly, also why not just use a background image in the style?

Kyle Sevenoaks
i can't give wrapper an height 'cause its content changes in every page and with min-height doesn't work either.
vitto
i use an img because i need it to stretch all along its container, if i use a bg image i can't do that (i think).also i used z-index:0 so that i don't need to give a z-index to all the following elements to be displayed over the image.Anyway i set the z-index correctly and it doesn't work yet
vitto
Do you have a live example? Also, the `z-index` thing I told you about was just a general IE fix, wasn't intended to fix your problem, just thought I should let you know.
Kyle Sevenoaks
the problem with explorer is that it inherits the page height as it was its parent..
vitto
i'll try to put up a sample page..thanks up to now ;)
vitto
Cool, will look when it's up.
Kyle Sevenoaks
here's the sample page..i think it's quite clearhttp://www.azero.it/check/check.html
vitto
dead thread?any more ideas?
vitto
A: 

dead thread? any more ideas?

vitto
Your image is borken and I really am not sure what you're asking about, everything seems fine here.
Kyle Sevenoaks
hi kyle..actually the problem only exists in explorer 7..that's what i'd like to get to. If you try the page in that browser you will see the difference between ie7 and the rest.
vitto