deltatango5
01-03-2008, 06:31 PM
I've been trying to find a "solution" that allows me to have a parent <div> (with a fixed position-centered) on a browser page, and have it contain multiple nested <div> tags.
I want to be able to do this so it works on both IE and FF, as well MAC. Through several attempts I've utilized a background-image--but don't believe that is compliant with "all" recent platforms, etc. I've also been able to place the nested <div> tags but then shove the parent div's image down ...
Does anyone have thoughts, links, suggestions or a quick example to toss my way?
Thanks Much and Happy New Year!
Des
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>TEST</title>
<style type="text/css"><!--
body {
background-color: #EEEEEE;
color:#564b47;
padding:20px;
margin:0px;
text-align: center;
}
#main {
z-index:0
text-align: left;
vertical-align: middle;
margin: 0px auto;
padding: 0px;
height: 531px;
width: 804px;
background-color: purple;
//background-image:url(images/bg-lft2.gif);
//background-repeat: no-repeat;
//border: 1px dotted #564b47;
//border: 1px dashed #564b47;
border: 1px solid #81B1D9;
}
#c1 { z-index:10; position:relative; width: 100px; height: 100px; left:5px; top:5px; background-color: #FF9900; }
#c2 { z-index:20; position:relative; width: 100px; height: 100px; left:5px; top:10px; background-color: #FF6600; }
#c3 { z-index:30; position:relative; width: 100px; height: 100px; left:5px; top:15px; background-color: #FF3300; }
--></style>
</head>
<body>
<div id="main">
<div id="c1"><img src="images/invisi.gif" alt="" width="100" height="100" border="0"/></div>
<div id="c2"><img src="images/invisi.gif" alt="" width="100" height="100" border="0"/></div>
<div id="c3"><img src="images/invisi.gif" alt="" width="100" height="100" border="0"/></div>
<img src="images/bg-lft2.gif" alt="" width="804" height="531" border="0"/>
</div>
</body>
</html>
I want to be able to do this so it works on both IE and FF, as well MAC. Through several attempts I've utilized a background-image--but don't believe that is compliant with "all" recent platforms, etc. I've also been able to place the nested <div> tags but then shove the parent div's image down ...
Does anyone have thoughts, links, suggestions or a quick example to toss my way?
Thanks Much and Happy New Year!
Des
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>TEST</title>
<style type="text/css"><!--
body {
background-color: #EEEEEE;
color:#564b47;
padding:20px;
margin:0px;
text-align: center;
}
#main {
z-index:0
text-align: left;
vertical-align: middle;
margin: 0px auto;
padding: 0px;
height: 531px;
width: 804px;
background-color: purple;
//background-image:url(images/bg-lft2.gif);
//background-repeat: no-repeat;
//border: 1px dotted #564b47;
//border: 1px dashed #564b47;
border: 1px solid #81B1D9;
}
#c1 { z-index:10; position:relative; width: 100px; height: 100px; left:5px; top:5px; background-color: #FF9900; }
#c2 { z-index:20; position:relative; width: 100px; height: 100px; left:5px; top:10px; background-color: #FF6600; }
#c3 { z-index:30; position:relative; width: 100px; height: 100px; left:5px; top:15px; background-color: #FF3300; }
--></style>
</head>
<body>
<div id="main">
<div id="c1"><img src="images/invisi.gif" alt="" width="100" height="100" border="0"/></div>
<div id="c2"><img src="images/invisi.gif" alt="" width="100" height="100" border="0"/></div>
<div id="c3"><img src="images/invisi.gif" alt="" width="100" height="100" border="0"/></div>
<img src="images/bg-lft2.gif" alt="" width="804" height="531" border="0"/>
</div>
</body>
</html>