Jump to content

Header and Footer help


metalhead12690

Recommended Posts

I can not figure out how to get a header and footer to work using this code. I tried coding it in the CSS but it didn't work out to well...

<style type="text/css"> body    {      margin: 0;      padding: 0;      border: 0;      overflow: hidden;      height: 100%;      max-height: 100%;    }#rightside    {     position: absolute;     top: 0;     bottom: 0;     left: auto;     width: 180px;     height: 100%;     overflow: auto;     background: brown;     color: beige;    }#leftside    {     position: absolute;     top: 0;     bottom: 0;     right: 0;     width: 180px;     height: 100%;     overflow: auto;     background: brown;     color: beige;    } .maincenter  {   position: fixed;   font-size: 24px;   top: 0;    left: 180px;   right: 180px;   bottom: 0;   overflow: auto;    background-color: beige;   color: brown;  }.indentcode  {   margin: 12px;   }</style> </head> <body><div id="rightside"> <h1>Menu</h1> <div class="indentcode"> <h1>Menu:</h1> <ol> <li>first</li> <li>second</li> <li>third</li> <li>fourth</li> <li>fifth</li> </ol> </div> This is the menu.<div class="indentcode"> This is the menu idented.</div> </div> <div class="maincenter"> <div class="indentcode"><h1>This is the information I am providing.</h1> There is a lot of information here. There is a lot of information here. There is a lot of information here. There is a lot of information here. There is a lot of information here. There is a lot of information here. There is a lot of information here. There is a lot of information here. There is a lot of information here. <br /><br /><br /><br /><br /><br /><br /><br /></div> </div> <div id="leftside"> <h1>Menu</h1> <div class="indentcode"> <h1>Menu:</h1> <ol> <li>first</li> <li>second</li> <li>third</li> <li>fourth</li> <li>fifth</li> </ol> </div> This is the menu.<div class="indentcode"> This is the menu idented.</div> </div> </body> 

Link to comment
Share on other sites

define "work". What exactly are you trying to do? Information and context go a long way towards figuring out the solutions to problems (especially if the problem hasn't even been defined).From what I can see, you are already using positioning, probably without really knowing why. I think you would find yourself a lot better off trying to use floats, margins, and padding's instead.http://www.w3schools.com/css/css_boxmodel.asp

Link to comment
Share on other sites

define "work". What exactly are you trying to do? Information and context go a long way towards figuring out the solutions to problems (especially if the problem hasn't even been defined).From what I can see, you are already using positioning, probably without really knowing why. I think you would find yourself a lot better off trying to use floats, margins, and padding's instead.http://www.w3schools.com/css/css_boxmodel.asp
The teacher is asking that I add a header and footer to the code I have provided but I have tried many different ways to get a header and footer to work like using a h2 or table tags but in the end it just appears in the middle instead of being at the top and bottom of the entire page.
Link to comment
Share on other sites

BasicSlightly dressed upNormally I try not to give stuff away to students, but what you're looking for is so generic you could get it almost anywhere. Just promise me you'll study these and learn how they work. That way, when your teacher points to something and says, why is this like that, you'll have an answer.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...