nycguurl
06-26-2009, 04:43 AM
A nice guy on the DD forums gave me this code awhile back. It's so amazing, it helped me absolutely position elements inside a div. It's supposed to center the parent, and then the contents inside are absolutely positioned where I want. But for some reason, although the div centers perfectly in IE, it doesn't center in Firefox. Can you please help me? :( :confused: :o :p :eek:
This is in the HEAD section:
<style type="text/css">
.container1 {
position:relative;
width:275px;
height:658px;
margin:0 auto;
}
.abs_im {
position:absolute;
border:none;
}
#pic1 {
top:0;
left:0px;}
#pic2 {
top:534;
left:210;
}
</style>
This is in the BODY section:
<div class="container1">
<img class="abs_im" id="pic1" alt="" src="images/notepaper_1.png" width="384" height="658">
<a href="javascript:poptastic('get.html');"><img class="abs_im" id="pic2" alt="" src="images/clickme.gif" width="100" height="98"></a></div>
This is in the HEAD section:
<style type="text/css">
.container1 {
position:relative;
width:275px;
height:658px;
margin:0 auto;
}
.abs_im {
position:absolute;
border:none;
}
#pic1 {
top:0;
left:0px;}
#pic2 {
top:534;
left:210;
}
</style>
This is in the BODY section:
<div class="container1">
<img class="abs_im" id="pic1" alt="" src="images/notepaper_1.png" width="384" height="658">
<a href="javascript:poptastic('get.html');"><img class="abs_im" id="pic2" alt="" src="images/clickme.gif" width="100" height="98"></a></div>