Forum Moderators: not2easy
position: relative; to your page centering div.. the same one you have margin: auto; on see if that helps body {
font: normal 12px/normal Arial, sans-serif;
color: #eaeaea;
background-color: #3D3A32;
width: 1100px;
height: 768px;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
padding: 0px;
border: none;
}
#fancybox-loading {
position: fixed;
top: 50%;
left: 50%;
height: 40px;
width: 40px;
margin-top: -20px;
margin-left: -20px;
cursor: pointer;
overflow: hidden;
z-index: 1104;
display: none;
}
* html #fancybox-loading {/* IE6 */
position: absolute;
margin-top: 0;
}
#fancybox-loading div {
position: absolute;
top: 0;
left: 0;
width: 40px;
height: 480px;
background-image: url('fancybox.png');
}
#fancybox-overlay {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
background: #000;
z-index: 1100;
display: none;
}
* html #fancybox-overlay {/* IE6 */
position: absolute;
width: 100%;
}
#fancybox-tmp {
padding: 0;
margin: 0;
border: 0;
overflow: auto;
display: none;
}
#fancybox-wrap {
position: absolute;
top: 0;
left: 0;
margin: 0;
padding: 20px;
z-index: 1101;
display: none;
}
#fancybox-outer {
position: relative;
width: 100%;
height: 100%;
background: #FFF;
}
#fancybox-inner {
position: absolute;
top: 0;
left: 0;
width: 1px;
height: 1px;
padding: 0;
margin: 0;
outline: none;
overflow: hidden;
}
#fancybox-hide-sel-frame {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: transparent;
}
#fancybox-close {
position: absolute;
top: -15px;
right: -15px;
width: 30px;
height: 30px;
background-image: url('fancybox.png');
background-position: -40px 0px;
cursor: pointer;
z-index: 1103;
display: none;
}
#fancybox_error {
color: #444;
font: normal 12px/20px Arial;
padding: 7px;
margin: 0;
}
#fancybox-content {
height: auto;
width: auto;
padding: 0;
margin: 0;
}
#fancybox-img {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
border: none;
outline: none;
line-height: 0;
vertical-align: top;
-ms-interpolation-mode: bicubic;
}
#fancybox-frame {
position: relative;
width: 100%;
height: 100%;
border: none;
display: block;
}
#fancybox-title {
position: absolute;
bottom: 0;
left: 0;
font-family: Arial;
font-size: 12px;
z-index: 1102;
}
.fancybox-title-inside {
padding: 10px 0;
text-align: center;
color: #333;
}
.fancybox-title-outside {
padding-top: 5px;
color: #FFF;
text-align: center;
font-weight: bold;
}
.fancybox-title-over {
color: #FFF;
text-align: left;
}
#fancybox-title-over {
padding: 10px;
background-image: url('fancy_title_over.png');
display: block;
}
#fancybox-title-wrap {
display: inline-block;
}
#fancybox-title-wrap span {
height: 32px;
float: left;
}
#fancybox-title-left {
padding-left: 15px;
background-image: url('fancybox.png');
background-position: -40px -90px;
background-repeat: no-repeat;
}
#fancybox-title-main {
font-weight: bold;
line-height: 29px;
background-image: url('fancybox-x.png');
background-position: 0px -40px;
color: #FFF;
}
#fancybox-title-right {
padding-left: 15px;
background-image: url('fancybox.png');
background-position: -55px -90px;
background-repeat: no-repeat;
}
#fancybox-left, #fancybox-right {
position: absolute;
bottom: 0px;
height: 100%;
width: 35%;
cursor: pointer;
outline: none;
background-image: url('blank.gif');
z-index: 1102;
display: none;
}
#fancybox-left {
left: 0px;
}
#fancybox-right {
right: 0px;
}
#fancybox-left-ico, #fancybox-right-ico {
position: absolute;
top: 50%;
left: -9999px;
width: 30px;
height: 30px;
margin-top: -15px;
cursor: pointer;
z-index: 1102;
display: block;
}
#fancybox-left-ico {
background-image: url('fancybox.png');
background-position: -40px -30px;
}
#fancybox-right-ico {
background-image: url('fancybox.png');
background-position: -40px -60px;
}
#fancybox-left:hover, #fancybox-right:hover {
visibility: visible; /* IE6 */
}
#fancybox-left:hover span {
left: 20px;
}
#fancybox-right:hover span {
left: auto;
right: 20px;
}
.fancy-bg {
position: absolute;
padding: 0;
margin: 0;
border: 0;
width: 20px;
height: 20px;
z-index: 1001;
}
#fancy-bg-n {
top: -20px;
left: 0;
width: 100%;
background-image: url('fancybox-x.png');
}
#fancy-bg-ne {
top: -20px;
right: -20px;
background-image: url('fancybox.png');
background-position: -40px -162px;
}
#fancy-bg-e {
top: 0;
right: -20px;
height: 100%;
background-image: url('fancybox-y.png');
background-position: -20px 0px;
}
#fancy-bg-se {
bottom: -20px;
right: -20px;
background-image: url('fancybox.png');
background-position: -40px -182px;
}
#fancy-bg-s {
bottom: -20px;
left: 0;
width: 100%;
background-image: url('fancybox-x.png');
background-position: 0px -20px;
}
#fancy-bg-sw {
bottom: -20px;
left: -20px;
background-image: url('fancybox.png');
background-position: -40px -142px;
}
#fancy-bg-w {
top: 0;
left: -20px;
height: 100%;
background-image: url('fancybox-y.png');
}
#fancy-bg-nw {
top: -20px;
left: -20px;
background-image: url('fancybox.png');
background-position: -40px -122px;
}
/* IE */
#fancybox-loading.fancybox-ie div{ background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancy_loading.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-close{ background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancy_close.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-title-over{ background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
.fancybox-ie #fancybox-title-left{ background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancy_title_left.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-title-main{ background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancy_title_main.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-title-right{ background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancy_title_right.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-left-ico{ background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancy_nav_left.png', sizingMethod='scale'); }
.fancybox-ie #fancybox-right-ico{ background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancy_nav_right.png', sizingMethod='scale'); }
.fancybox-ie .fancy-bg { background: transparent !important; }
.fancybox-ie #fancy-bg-n{ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancy_shadow_n.png', sizingMethod='scale'); }
.fancybox-ie #fancy-bg-ne{ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancy_shadow_ne.png', sizingMethod='scale'); }
.fancybox-ie #fancy-bg-e{ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancy_shadow_e.png', sizingMethod='scale'); }
.fancybox-ie #fancy-bg-se{ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancy_shadow_se.png', sizingMethod='scale'); }
.fancybox-ie #fancy-bg-s{ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancy_shadow_s.png', sizingMethod='scale'); }
.fancybox-ie #fancy-bg-sw{ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancy_shadow_sw.png', sizingMethod='scale'); }
.fancybox-ie #fancy-bg-w{ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancy_shadow_w.png', sizingMethod='scale'); }
.fancybox-ie #fancy-bg-nw{ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancy_shadow_nw.png', sizingMethod='scale'); } position:relative; instead.. and see if that works #slideshow {
position:absolute;
top:233px;
left:28px;
height:297px;
width:969px;
border:0;
z-index:100;
}
<div id="slideshow">
<div class="jMyCarousel">
<ul>
<li><a rel="example_group" href="images/gallery_history/1.jpg" title="">
<img src="images/gallery_history/1_Thumb.jpg" width="297px" height="297px" alt="" /></a></li>
<li><a rel="example_group" href="images/gallery_history/2.jpg" title="">
<img src="images/gallery_history/2_Thumb.jpg" width="297px" height="297px" alt="" /></a></li>
<li><a rel="example_group" href="images/gallery_history/3.jpg" title="">
<img src="images/gallery_history/3_Thumb.jpg" width="297px" height="297px" alt="" /></a></li>
<li><a rel="example_group" href="images/gallery_history/4.jpg">
<img src="images/gallery_history/4_Thumb.jpg" width="297px" height="297px" alt="" /></a></li>
<li><a rel="example_group" href="images/gallery_history/5.jpg">
<img src="images/gallery_history/5_Thumb.jpg" width="297px" height="297px" alt="" /></a></li>
<li><a rel="example_group" href="images/gallery_history/6.jpg">
<img src="images/gallery_history/6_Thumb.jpg" width="297px" height="297px" alt="" /></a></li>
<li><a rel="example_group" href="images/gallery_history/7.jpg">
<img src="images/gallery_history/7_Thumb.jpg" width="297px" height="297px" alt="" /></a></li>
<li><a rel="example_group" href="images/gallery_history/8.jpg">
<img src="images/gallery_history/8_Thumb.jpg" width="297px" height="297px" alt="" /></a></li>
<li><a rel="example_group" href="images/gallery_history/9.jpg">
<img src="images/gallery_history/9_Thumb.jpg" width="297px" height="297px" alt="" /></a></li>
<li><a rel="example_group" href="images/gallery_history/10.jpg">
<img src="images/gallery_history/10_Thumb.jpg" width="297px" height="297px" alt="" /></a></li>
<li><a rel="example_group" href="images/gallery_history/11.jpg">
<img src="images/gallery_history/11_Thumb.jpg" width="297px" height="297px" alt="" /></a></li>
<li><a rel="example_group" href="images/gallery_history/12.jpg">
<img src="images/gallery_history/12_Thumb.jpg" width="297px" height="297px" alt="" /></a></li>
<li><a rel="example_group" href="images/gallery_history/13.jpg">
<img src="images/gallery_history/13_Thumb.jpg" width="297px" height="297px" alt="" /></a></li>
<li><a rel="example_group" href="images/gallery_history/14.jpg">
<img src="images/gallery_history/14_Thumb.jpg" width="297px" height=297px"" alt="" /></a></li>
<li><a rel="example_group" href="images/gallery_history/15.jpg">
<img src="images/gallery_history/15_Thumb.jpg" width="297px" height="297px" alt="" /></a></li>
<li><a rel="example_group" href="images/gallery_history/16.jpg">
<img src="images/gallery_history/16_Thumb.jpg" width="297px" height="297px" alt="" /></a></li>
<li><a rel="example_group" href="images/gallery_history/17.jpg">
<img src="images/gallery_history/17_Thumb.jpg" width="297px" height="297px" alt="" /></a></li>
</ul>
</div>
</div>
html {background: lime;}
body {
font: normal 12px/normal Arial, sans-serif;
color: #eaeaea;
background-color: #3D3A32;
width: 800px;
height: 768px;
/*
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
*/
margin: auto;
padding: 0px;
border: none;
}
margin: auto; works to center without the need for AP, which might help other containing problems within the page.. use AP sparingly! ;) [edited by: SuzyUK at 9:07 pm (utc) on Jul 1, 2010]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> Page Title </title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<style type="text/css" media="screen">
html, body {margin: 0; padding: 0; border: 0;}
body {
font: normal 12px/normal Arial, sans-serif;
background: lime;
}
/*
#sitewrap {
color: #eaeaea;
background-color: #3D3A32;
width: 1000px;
height: 768px;
margin: auto;
position: relative;
}
*/
#deadcenter {
position: absolute;
top: 50%;
left: 50%;
height: 500px;
width: 800px;
margin-top: -250px; /* negative half of required height */
margin-left: -400px; /* negative half of required width */
background: #fff;
color: #000;
}
</style>
</head>
<body>
<div id="sitewrap">
<div id="deadcenter">horizontal and vertical centered div</div>
</div>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> Page Title </title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<style type="text/css" media="screen">
html, body {margin: 0; padding: 0; border: 0; height: 100%;}
body {
font: normal 12px/normal Arial, sans-serif;
background: lime;
text-align: center;
}
#sitewrap {
color: #eaeaea;
background-color: #3D3A32;
width: 1000px;
height: 100%;
margin: auto;
}
#sitewrap td {
vertical-align: middle;
padding: 50px;
text-align: left;
}
#sitewrap td #pr {
position: relative;
background: #fff;
color: #000;
height: 200px; /* this is not required and is for demo only adjust to see affect of long/short content */
}
.test {
position: absolute;
margin: 0;
top: 0;
right: 0;
width: 150px;
height: 150px;
background: #dad;
}
</style>
</head>
<body>
<table id="sitewrap">
<tr><td><div id="pr">
<p>horizontal and vertical centered content inside the sitewrap</p>
<p class="test">test this for positioning in table cell</p>
</div></td><tr>
</div>
</body>
</html>
position: relative on the #pr div to check this