Jump to content


header/footer problem...


3 replies to this topic

#1 Praise

    Young Padawan

  • Members
  • Pip
  • 51 posts

Posted 29 July 2008 - 11:08 PM

theres a space below my footer and above my header, i validated the code and had to take out the center tags i used which was <center> can someone one fix this code where the header and footer dose not have a space


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<style type="text/css">
body {
background: #0066FF;
font-size:12px;
font-family:Arial;
border-top:thick;
border-top-color:#FFFFFF;
border-top-width: 800px;
border-top-height: 20px;
border-top-style:none
font-variant:small-caps;
}
#header {
background:#ffffff;
width: 800px;
height: 40px;
}
#bodycontent {
background-color:#CCCCCC;
width: 800px;
height: 500px;
postition: center;
}
#footer {
background-color:#FFFFFF;
width: 800px;
height: 40px;
}
</style>
<div id=header>header</div>
<div id=bodycontent>this is some content
</div>
<div id=footer>footer</div>
</body>
</html>

Any Recommended Tutorials? I No The Basics Want To Learn More Advanced HTML

Edited by Praise, 29 July 2008 - 11:25 PM.


#2 Bug

    P2L Staff

  • P2L Staff
  • PipPipPipPip
  • 3,611 posts
  • Gender:Male
  • Location:Perth, Australia

Posted 29 July 2008 - 11:26 PM

If you're talking about what I think you're talking about, you just need to add the following to your "body" tag in your CSS:

margin:0;

I hope this is what you were after.

#3 Praise

    Young Padawan

  • Members
  • Pip
  • 51 posts

Posted 29 July 2008 - 11:30 PM

exacly, thank you

#4 Tyson D

    Young Padawan

  • Members
  • Pip
  • 85 posts
  • Gender:Male
  • Location:Canada

Posted 30 July 2008 - 08:23 AM

If you end up with footer problems, then here is a helpful resource I came across:

http://fortysevenmedia.com/blog/archives/m...y_put_with_css/





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users