Forum Moderators: not2easy
or is there any workaround to this bug in IE, I assume its a bug since mozilla displays it fine.
Isn't there a way to make a div thats relative, go on top of all other divs on the page?
Yep that's what giving it a higher z-index does..;)
btw.. if you haven't explicitly stated that the div/form is position: relative; it will have the default position: static; assigned and you will be unable to assign a z-index..
Suzy
<div id="maincenter">
<div style="float:left;"><img src="spacer.gif" height="700" width="1" border="0" alt="" /></div>
<div id="main2">
<br />
<div class="main">
<div class="top">text</div>
<div class="maincontent"><form><input type="text" name="blah" /></form>
</div>
</div>
</div>
<div id="footer">footer text</div><div id="maincenter2">
<div id="main3">
<br />
<div id="navleft">
<div class="navbox">
<div class="top">text</div>
<div class="content">text</div>
</div>
</div>
<div id="navright">
<div class="navbox">
<div class="top">text</div>
<div class="content">text</div>
</div>
</div>
</div>
</div>
CSS:
#maincenter
{
position: absolute;
top: 200px;
width: 770px;
left: 50%;
margin-left: -385px;
background-color: #f7f7f7;
border-left: 1px solid #044862;
border-right: 1px solid #044862;
}
#maincenter2
{
position: absolute;
top: 200px;
width: 770px;
left: 50%;
margin-left: -385px;
}
.main
{
width: 420px;
min-width: 420px;
margin-bottom: 15px;
font-size: 12px;
background-color: #e0e0e0;
border: 1px solid #006386;
position: relative;
z-index: 1;
left: 50%;
margin-left: -215px;
}
#main2
{
width: 420px;
height: 100%;
margin: 0px auto;
position: relative;
}
#main3
{
width: 770px;
height: 100%;
position: relative;
}
#footer
{
background-color: #E1E1E1;
border-top: 1px solid #c0c0c0;
background-image: url(WSD_35.gif);
text-align:center;
position: relative;
padding:5px;
font-size:10px;
font-weight:bold;
color: #FFFFFF;
height: 16px;
clear: both;
}
#navleft
{
width: 150px;
min-width:150px;
left: 0;
position: relative;
float: left;
margin: 0 1% 0 1%;
}
#navright
{
width: 150px;
min-width:150px;
margin: 0 1% 0 1%;
right: 0;
float: right;
position: relative;
}
.navbox
{
background-color: #e0e0e0;
width: 100%;
margin-bottom: 15px;
border: 1px solid #006386;
}
.content
{
padding:4px;
text-align:left;
}
.top
{
background-image: url(WSD_18.gif);
height: 16px;
color: #FFFFFF;
font-weight: bold;
font-size: 10px;
text-align: center;
text-transform: uppercase;
}
Sorry about the formatting, tried to get the indentations to work, it wouldn't.