N
Nate12o6
Im trying to layor one div over another but am having trouble. Take a
look at the code snippet:
<body bgcolor="#ffffff" text="#000000" id="htmlsource">
<div id="clientsDiv" style="float: left; width:25%;">
<fieldset>
<legend>Clients</legend>
<div id="clients" style="float: left; height:478px; overflow:
auto;">
</div>
<div id="loaderContainerClients" onClick="return false;">
<div id="loaderClients">
<img src="loading.gif" height="32" width="32" alt=""/>
</div>
</div>
</fieldset>
</div>
<div id="orderDiv" style="float: right; width:70%; height:500px;">
<fieldset>
<legend>Client order information</legend>
<span style="position: relative; top: 35%; text-align:center; font-
size: 3em; font-weight: bold;">
<p><center>Select Customer</center></p>
</span>
</fieldset>
</div>
</body>
The clients div is dynamicaly populated with ajax.
The CSS looks like this:
html { overflow-y: scroll; }
html { overflow: -moz-scrollbars-vertical; }
body {margin: 2em; background-image: none; background-color: white;
font-size: .9em; text-align: left; }
fieldset {background: #fffbef; -moz-border-radius: 5px; height:
100%; }
legend {background: #fff; padding: 2px 6px; border: 1px #999 solid; -
moz-border-radius: 5px; }
p {margin: 15px 0; padding: 8px; }
select {width:100%;}
label {margin: 4px 0; font-weight: bold;}
p img {margin-left: 10px; }
/* --- loader ---*/
#loaderClients img {
position: absolute;
left:45%;
}
#loaderContainerClients {
position:relative;
background-image: url(semi-transparent.gif);
z-index: 1001;
width: 100%;
height: 478px;
}
#loaderContainerClients div {
padding-top: 175px;
text-align: center;
}
/* --- loader ---*/
#loaderOrder {
width: 320px;
margin-left: auto;
margin-right: auto;
}
#loaderOrder div {
padding: 3px;
background: #ffffff;
}
#loaderOrder p {
border: 3px solid #6E89DD;
padding: 10px;
margin: 0;
background: #EEF0FC;
}
#loaderOrder img {
float: left;
margin-right: 12px;
}
#loaderOrder strong {
display: block;
margin-bottom: 3px;
}
#loaderContainerOrder {
position: absolute;
width: 74%;
height: 478px;
position: expression('absolute');
z-index: 10001;
background-image: url(semi-transparent.gif);
}
#loaderContainerOrder div {
padding-top: 150px;
vertical-align: top;
text-align: center;
}
#loaderContainerOrder div div {
padding-top: 3px;
text-align: left;
}
It looks perfect in Firefox but in IE the loaderContainerClients div
will not layor on top of clients. It goes directly underneath.
Shouldnt the z-index take care of this?
Any help would be apreciated.
look at the code snippet:
<body bgcolor="#ffffff" text="#000000" id="htmlsource">
<div id="clientsDiv" style="float: left; width:25%;">
<fieldset>
<legend>Clients</legend>
<div id="clients" style="float: left; height:478px; overflow:
auto;">
</div>
<div id="loaderContainerClients" onClick="return false;">
<div id="loaderClients">
<img src="loading.gif" height="32" width="32" alt=""/>
</div>
</div>
</fieldset>
</div>
<div id="orderDiv" style="float: right; width:70%; height:500px;">
<fieldset>
<legend>Client order information</legend>
<span style="position: relative; top: 35%; text-align:center; font-
size: 3em; font-weight: bold;">
<p><center>Select Customer</center></p>
</span>
</fieldset>
</div>
</body>
The clients div is dynamicaly populated with ajax.
The CSS looks like this:
html { overflow-y: scroll; }
html { overflow: -moz-scrollbars-vertical; }
body {margin: 2em; background-image: none; background-color: white;
font-size: .9em; text-align: left; }
fieldset {background: #fffbef; -moz-border-radius: 5px; height:
100%; }
legend {background: #fff; padding: 2px 6px; border: 1px #999 solid; -
moz-border-radius: 5px; }
p {margin: 15px 0; padding: 8px; }
select {width:100%;}
label {margin: 4px 0; font-weight: bold;}
p img {margin-left: 10px; }
/* --- loader ---*/
#loaderClients img {
position: absolute;
left:45%;
}
#loaderContainerClients {
position:relative;
background-image: url(semi-transparent.gif);
z-index: 1001;
width: 100%;
height: 478px;
}
#loaderContainerClients div {
padding-top: 175px;
text-align: center;
}
/* --- loader ---*/
#loaderOrder {
width: 320px;
margin-left: auto;
margin-right: auto;
}
#loaderOrder div {
padding: 3px;
background: #ffffff;
}
#loaderOrder p {
border: 3px solid #6E89DD;
padding: 10px;
margin: 0;
background: #EEF0FC;
}
#loaderOrder img {
float: left;
margin-right: 12px;
}
#loaderOrder strong {
display: block;
margin-bottom: 3px;
}
#loaderContainerOrder {
position: absolute;
width: 74%;
height: 478px;
position: expression('absolute');
z-index: 10001;
background-image: url(semi-transparent.gif);
}
#loaderContainerOrder div {
padding-top: 150px;
vertical-align: top;
text-align: center;
}
#loaderContainerOrder div div {
padding-top: 3px;
text-align: left;
}
It looks perfect in Firefox but in IE the loaderContainerClients div
will not layor on top of clients. It goes directly underneath.
Shouldnt the z-index take care of this?
Any help would be apreciated.