I'm having trouble centering my main container on the page. No matter what I try, it still seems to be floating to the left... I'm wrapping all my content in its own Div because I'm using a jQuery cycle background and I want to keep my content separate from the background. Unfortunately, I just can't seem to get the Div container to center properly... I'm hoping someone more experienced can help me figure this out!
Here is my HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Homepage</title>
<link rel="stylesheet" type="text/css" media="screen" href="style.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.3.min.js"></script> <script type="text/javascript" src="jquery.cycle.all.js"></script>
<script>
$(document).ready(function() {
$('#slideshow').cycle({
fx: 'fade',
pager: '#smallnav',
pause: 1,
speed: 1800,
timeout: 3500
});
});
</script>
</head>
<body>
<div class="bx-overlay">
</div>
<div id="slideshow">
<img src="images/3.jpg" alt="san diego"/>
<img src="images/2.jpg" alt="bridge"/>
<img src="images/1.jpg" alt="mountains"/>
<img src="images/4.jpg" alt="waves"/>
<img src="images/5.jpg" alt="americanflag"/>
<img src="images/6.jpg" alt="football"/>
</div>
<div id="container">
<div id="header">
<img src="images/header.png">
</div>
</div>
</body>
</html>
And here is my CSS:
#slideshow, img.bgM {
min-height: 100%;
min-width: 1024px;
width: 100%;
height: auto;
position: fixed;
top: 0;
left: 0;
z-index: -9999;
}
.bx-overlay {
width: 100%;
height: 100%;
position: fixed;
top: 0px;
left: 0px;
background: transparent url(images/pattern.png) repeat top left;
z-index: -1;
}
#container{
position: absolute;
text-align: center;
margin: 0 auto;
}
#header {
display: block;
position: absolute;
text-align: center;
margin: 0 auto;
}