html - place footer at the bottom of the page -


i want place footer @ bottom of page. contained inside div. problem if use fixed positioning, footer sticks @ bottom not disappear if scroll page. if use absolute or relative positioning footer shows @ middle of page.

i want stay @ bottom should not sticky i.e when scroll up, footer must disappear. must shows when scroll down bottom , reached end of page.

ps: page contains iframe.

html

<!doctype html> <html lang="en">     <head>         <title>help</title>         <meta charset="utf-8">         <link rel="stylesheet" href="style.css">     </head>     <body>         <div id="header">             <img id="logo" src="images/logo.png" alt="logo">         </div>         <div id="menu">             <ul>                 <li><a href="about.html" target="content">about</a></li>                 <li><a href="support.html" target="content">support</a></li><br>                 <li>student operation                     <ul>                         <li><a href="logging_in.html" target="content">logging in</a></li>                         <li><a href="creating_enquiry.html" target="content">creating enquiry</a></li>                         <li><a href="issuing_prospectus.html" target="content">issuing prospectus</a></li>                         <li><a href="making_admission.html" target="content">making admission</a></li>                         <li><a href="collecting_fees.html" target="content">collecting fees</a></li>                         <li><a href="issuing_kit.html" target="content">issuing kit</a></li>                     </ul>                 </li><br>                 <li>                     batch operation                     <ul>                         <li><a href="creating_batch.html" target="content">creating batch</a></li>                         <li>marking attendance</li>                         <li>transferring batch</li>                     </ul>                 </li><br>                 <li>                     resource operation                     <ul>                         <li>center resource allocation</li>                         <li>student resource allocation</li>                     </ul>                 </li><br>                 <li>                     course operation                     <ul>                         <li>course type</li>                         <li>course list</li>                         <li>course module</li>                         <li>course price list</li>                         <li>distance university list</li>                     </ul>                 </li><br>                 <li>                     inventory operation                     <ul>                         <li>kit management</li>                         <li>item category</li>                         <li>item stock</li>                         <li>item purchase</li>                     </ul>                 </li><br>                 <li>                     admin operation                     <ul>                         <li>kit validation</li>                         <li>users & groups</li>                         <li>employee management</li>                     </ul>                 </li>             </ul>         </div>         <div id="frame">             <iframe id="content" name="content"></iframe>         </div>         <div id="footer">             <p>footer text</p>         </div>     </body> </html> 

css

body {     margin: 0;     padding: 0;     font-family: sans-serif;     font-size: 80%; }  #header {     background-color: #f8651c;     padding-bottom: 5%;     margin: 0;     border: 0; }  #logo {     position: relative;     left: 20px;     top: 20px; }  #menu {     width: 25%;     float: left;     border-right: 2px solid #a2a2a2;     margin: 0;     padding: 0; }  #content {     position: absolute;     height: 93%;     width: 74%;     padding: 0;     margin: 0;     border: 0; }  #footer{     position: fixed;     left: 0;     bottom:0;     background-color:#000;     width:100%;     height: 10px;  } 

like this

demo

css

#footer{     position: relative;     left: 0;     bottom:0;     background-color:#000;     width:100%;     bottom:0;     padding:5px 0; } .clearfix{     clear:both; } #footer p{     color:white; } 

Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -