BillyRayPreachersSon
Programmer
I've been looking at this for quite a while, and cannot for the life of me work out why it is happening.
Basically, I've an absolutely-positioned DIV element inside a relatively-positioned one, and I've positioned that inner DIV to be at the bottom of the outer one.
In all browsers other than IE 6, this works fine... but in IE 6, it fails miserably.
Here's a cut-down harness that illustrates the problem:
I know how to fix it (give the header DIV layout), but what I want to know is why it is happening... this is about as basic as styling gets, and yet I've never seen anything like it.
Can anyone shed any light on why IE 6 is doing this? The CSS and HTML validate perfectly, so I'm stumped.
Thanks,
Dan
Coedit Limited - Delivering standards compliant, accessible web solutions
[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
Basically, I've an absolutely-positioned DIV element inside a relatively-positioned one, and I've positioned that inner DIV to be at the bottom of the outer one.
In all browsers other than IE 6, this works fine... but in IE 6, it fails miserably.
Here's a cut-down harness that illustrates the problem:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="en" />
<title>IE 6 weird bug problem</title>
<style type="text/css">
#header {
position: relative;
background-color: red;
}
#headerShadow {
position: absolute;
left: 0px;
bottom: 0px;
width: 200px;
background-color: green;
}
</style>
</head>
<body>
Some text - line 1<br />
Some text - line 2<br />
Some text - line 3<br />
Some text - line 4<br />
<div id="header">
Header text - line 1<br />
Header text - line 2<br />
<div id="headerShadow">..............</div>
</div>
</body>
</html>
I know how to fix it (give the header DIV layout), but what I want to know is why it is happening... this is about as basic as styling gets, and yet I've never seen anything like it.
Can anyone shed any light on why IE 6 is doing this? The CSS and HTML validate perfectly, so I'm stumped.
Thanks,
Dan
Coedit Limited - Delivering standards compliant, accessible web solutions
[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]