...

View Full Version : What's with this CSS code? Why is it doing this?



zoobs
07-06-2011, 06:50 PM
Help!

I'm trying to learn the ropes of making a PHP dynamic website, through various tutorials and books.

Now, this is a CSS question. From one tutorial I've been reading, he uses this basic CSS template and I wonder why it isn't working correctly?

Here's the code he provided for the tutorial:






body {
margin: auto;
background-color:#ffffff;
font-family: georgia,sans-serif;
color:#333;
}

#wrapper {
width:1024px;
background-color:#ffffff;
margin: auto;
}

#header {
width:1024px;
height:824px;
background-image: url(http://www.tim-searles.com/dbc/imgs/banner.png);
background-repeat: no-repeat;
}

#header h2 {
padding:10px;
}

#nav {
width:1024px;
height:53px;
background-image: url(http://www.tim-searles.com/dbc/imgs/nav_bg.png);
background-repeat: no-repeat;
margin: auto;
}

#nav a {
display:inline;
padding:10px;
text-decoration:none;
background-color:#f1f1f1;
}

#nav a:hover {
background-color:#bababa;
height:80px;
}

#content {
width:675px;
float:left;
padding:10px;
}

#sidebar {
width:200px;
float:right;
margin-bottom:25px;
}

#sidebar a {
text-decoration:none;
}

#sidebar li {
list-style:none;
}

#footer {
clear:both;
width:960px;
height:135px;
border-top:1px solid #ccc;
}

#footer p {
padding:10px;
}




and this: http://www.tim-searles.com/dbc/

is the ending result with my own images. Why is my nav bar so far down? Help.

alykins
07-06-2011, 06:53 PM
because you made your header 824px high

zoobs
07-06-2011, 06:56 PM
because you made your header 824px high

Well, I'm a dumbass. ha, thanks.

alykins
07-06-2011, 06:58 PM
lol :D no prob; we all have those days :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum