Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there,

Is it possible to code a footer similar to the header (but without the menu) in this example?

http://goo.gl/vKvaK

Feel free to update and edit the real code if you wish, the details are on the main page.

Kind regards

Pongy
Posted

Yes you can. Below is the code:

XML
<div id="container">
   <div id="header"></div>
   <div id="body"></div>
   <div id="footer"></div>
</div>



CSS:

CSS
html,
body {
   margin:0;
   padding:0;
   height:100%;
}
#container {
   min-height:100%;
   position:relative;
}
#header {
   background:#ff0;
   padding:10px;
}
#body {
   padding:10px;
   padding-bottom:60px;   /* Height of the footer */
}
#footer {
   position:absolute;
   bottom:0;
   width:100%;
   height:60px;   /* Height of the footer */
   background:#6cf;
}



For reference see links:
http://matthewjamestaylor.com/blog/keeping-footers-at-the-bottom-of-the-page[^]
 
Share this answer
 
Comments
PongyBoy1 30-Apr-11 2:24am    
Unfortunately I don't know how to combine that snippet with the code already in place.
If I understood you correctly, you just want the line. All you need is an HTML DIV which has the following style:

CSS
border-bottom: #2763A5 1px solid;
line-height: normal;
width: 100%;
 
Share this answer
 
Comments
PongyBoy1 30-Apr-11 2:24am    
Unfortunately I don't know how to combine that snippet with the code already in place.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900