Ok, I'm having an interesting problem using an absolutely positioned div inside a floated div. The absolutely positioned div ends up 2px (and it really is 2, not 1 or 3) farther to the right when viewed in IE 6 or Opera 8, compared with Firefox or Netscape. It doesn't matter whether there's anything in the floated div or not, it still has the same 2px jog. I've tried every fix I could find, notably the display:inline and specifying a height for both. I notice the jog because I'm trying to line up the background image with the border around #main. Anyway, here's the relevant code:
#main {
margin: 10px;
padding: 0;
position: relative;
float: left;
background: #fff;
border: 1px solid #CE8B3C;
text-align: left;
width: 550px;
height: 400px;
}
#menu1 {
margin: 0;
padding: 0;
height: 85px;
width: 150px;
position: absolute;
top: 20px;
left: 475px;
background: url(images/menu.gif) no-repeat top left;
}
<div id="main">
<div id="menu1">
<ul class="nav">
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"">home</a></li>
</ul>
</div>
</div>the Home link appears far to the right as it can get, in both IE and FF as I have seens.
Only difference I see is the height space where in IE it is closer to the topAre you in 'strict mode'?Are you in 'strict mode'?
Hmm, no I wasn't. And that fixes it. That's what happens when I'm working on multiple sites at once. Thanks!
#main {
margin: 10px;
padding: 0;
position: relative;
float: left;
background: #fff;
border: 1px solid #CE8B3C;
text-align: left;
width: 550px;
height: 400px;
}
#menu1 {
margin: 0;
padding: 0;
height: 85px;
width: 150px;
position: absolute;
top: 20px;
left: 475px;
background: url(images/menu.gif) no-repeat top left;
}
<div id="main">
<div id="menu1">
<ul class="nav">
<li><a href=http://www.webdeveloper.com/forum/archive/index.php/"">home</a></li>
</ul>
</div>
</div>the Home link appears far to the right as it can get, in both IE and FF as I have seens.
Only difference I see is the height space where in IE it is closer to the topAre you in 'strict mode'?Are you in 'strict mode'?
Hmm, no I wasn't. And that fixes it. That's what happens when I'm working on multiple sites at once. Thanks!