turpentyne
02-12-2012, 05:29 PM
I'm trying to layout a page using divs with overflow and z-indexes. When I went to view it in IE9, it's not working at all. I don't know if its z-index or if it's the overflow that isn't working. All the images appear in the browser as if I hadn't styled a thing.
Here's the code - it's not in a stylesheet at the moment, so I can test and move things around:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Workshops for Youth and Families</title>
</head>
<body><div style="position:relative; width:100%; z-index:300;">
<div id="register1" style="z-index:5;line-height: 0;height:0px;height:0;width:200px;overflow:visible;position:relative; left:565px; top:12px;"><a href="register.php"><img src="test_images/register.gif" border=0/></a></div>
<div id="support1" style="z-index:5;height:0px;width:200px;overflow:visible;position:relative; left:690px; top:12px;"><a href="support.php"><img src="test_images/support.gif" border=0/></a></div>
<div id="logo1" style="z-index:5;line-height: 0; height:0px;height:0;width:0px;overflow:visible;position:relative; left:110px;top:10px;"><img src="test_images/logo1.gif" /></div>
<div id="orho1" style="z-index:3; line-height: 0;height:0px;height:0;width:0px;overflow:visible;position:relative; left:-100px;top:20px;"><img src="test_images/orho1.gif" width=400px /></div>
<div id="tear1" style="z-index:2; height:10px; width:600px; overflow:visible; position:relative; top:67px;" ><img src="test_images/tear1.gif" /></div>
<div id="textbox1" style="z-index:1; background-color:#d9e496;width:100%;height:280px;position:relative;top:264px;">
<div id="whathappens1" style="position:relative; left:285px;"><img src="test_images/whathappens.gif" /></div>
<div id="fb1" style="position:relative; top: 130px; left:25px;height:0px;overflow:visible;"><img src="test_images/fb.gif" /></div>
<div id="twitter1" style="position:relative; top:130px; left:85px;overflow:visible;"><img src="test_images/twitter.gif" /></div>
<div id="orange1" style="position:relative; height:0px;width:0px;overflow:visible;left:310px;top:-34px;"><img src="test_images/orange.gif" width=1px height=200px />
<div id="tear2" style="z-index:2; height:44px;width:0px;overflow:visible;position:relative; left:-310px; width:100%; top:14px;background-image: url(test_images/tear2.gif); background-repeat: repeat-x;"><img src="test_images/tear2.gif" /></div>
</div>
</div>
<div id="textbox2" style="z-index:2; background-color:#c4d359;width:100%;height:280px;position:relative;top:234px;">
</div>
</div>
</body>
</html>
Here's the code - it's not in a stylesheet at the moment, so I can test and move things around:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Workshops for Youth and Families</title>
</head>
<body><div style="position:relative; width:100%; z-index:300;">
<div id="register1" style="z-index:5;line-height: 0;height:0px;height:0;width:200px;overflow:visible;position:relative; left:565px; top:12px;"><a href="register.php"><img src="test_images/register.gif" border=0/></a></div>
<div id="support1" style="z-index:5;height:0px;width:200px;overflow:visible;position:relative; left:690px; top:12px;"><a href="support.php"><img src="test_images/support.gif" border=0/></a></div>
<div id="logo1" style="z-index:5;line-height: 0; height:0px;height:0;width:0px;overflow:visible;position:relative; left:110px;top:10px;"><img src="test_images/logo1.gif" /></div>
<div id="orho1" style="z-index:3; line-height: 0;height:0px;height:0;width:0px;overflow:visible;position:relative; left:-100px;top:20px;"><img src="test_images/orho1.gif" width=400px /></div>
<div id="tear1" style="z-index:2; height:10px; width:600px; overflow:visible; position:relative; top:67px;" ><img src="test_images/tear1.gif" /></div>
<div id="textbox1" style="z-index:1; background-color:#d9e496;width:100%;height:280px;position:relative;top:264px;">
<div id="whathappens1" style="position:relative; left:285px;"><img src="test_images/whathappens.gif" /></div>
<div id="fb1" style="position:relative; top: 130px; left:25px;height:0px;overflow:visible;"><img src="test_images/fb.gif" /></div>
<div id="twitter1" style="position:relative; top:130px; left:85px;overflow:visible;"><img src="test_images/twitter.gif" /></div>
<div id="orange1" style="position:relative; height:0px;width:0px;overflow:visible;left:310px;top:-34px;"><img src="test_images/orange.gif" width=1px height=200px />
<div id="tear2" style="z-index:2; height:44px;width:0px;overflow:visible;position:relative; left:-310px; width:100%; top:14px;background-image: url(test_images/tear2.gif); background-repeat: repeat-x;"><img src="test_images/tear2.gif" /></div>
</div>
</div>
<div id="textbox2" style="z-index:2; background-color:#c4d359;width:100%;height:280px;position:relative;top:234px;">
</div>
</div>
</body>
</html>