Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: layered divs too high in IE
03-22-2005, 04:38 PM #1
- Join Date
- Mar 2005
- Thanked 0 Times in 0 Posts
layered divs too high in IE
ok, so i've been having this problem which only seems to occur in IE and not firefox. for some reason, when i position a div containing an image over the top of another image to get a layer effect (using relative positioning) it all screws up in IE, and the div always comes out twice as high as it needs to be, no matter whether i constrain its size or not, or whether i constrain the size of whatever is holding it. anyway, here is the code:
<tr><td><img src="images/buttons/base2.gif" name="btn1" alt="button" />
<div class="overlay"><a onMouseOver="btn1_act(); env_act()" onMouseOut="btn1_in(); env_in()"><img src="images/buttons/env.gif" name="b_env" alt="environments" /></a></div></td></tr>
<tr><td><img src="images/buttons/base.gif" name="btn2" alt="button" />
<div class="overlay"><a onMouseOver="btn2_act(); cha_act()" onMouseOut="btn2_in(); cha_in()"><img src="images/buttons/cha.gif" name="b_cha" alt="characters" /></a></div></td></tr>
and the overlay style:
the height : 0 thing is what i used to make it all fit in in firefox, dont ask me why but it made it work. the only question is, why doesnt it work in IE?
if anyone has a solution to this (besides absolute positioning), it would be greatly appreciated.