Hi, this is my first try at hand-coding a site, so forgive me if this is a stupid quesiton...
I have my site set up so that there is the page div, which contains the background image that repeats depending on the size of the window. Inside of that div, I have a div where I want the content to be. I tried setting this div's left and right margins to auto so that it stays in the center, but it doesn't move. Any help is appreciated. (You can ignore the two div's inside of the content div because I don't think they're causing the problem) Here is the code:
HTML:
CSS:
I have my site set up so that there is the page div, which contains the background image that repeats depending on the size of the window. Inside of that div, I have a div where I want the content to be. I tried setting this div's left and right margins to auto so that it stays in the center, but it doesn't move. Any help is appreciated. (You can ignore the two div's inside of the content div because I don't think they're causing the problem) Here is the code:
HTML:
<html>
<head>
<LINK REL=StyleSheet HREF="stylesheet.css" TYPE="text/css" MEDIA=screen>
</head>
<body>
<div id = page>
<div id = content>
<div id = header>
<div id = logo>
<img src="Images/logo.jpg" alt="Welcome to iMasterWeb!"/>
</div>
</div>
</div>
</div>
</body>
</html>
CSS:
Code:
#page {
width: 100%;
height: 970px;
background-image: url("Images/pagebackground.jpg");
background-repeat: repeat-x;
background-color: #999999;
}
#content {
height: 970px;
width: 960px;
float: left;
margin: 0, auto
}
#header {
float: left;
background: #333333;
width: 100%;
height: 175px;
}
#logo {
float: left;
padding: 25px;
margin: 0, 0, 0, 100px;
}