Created
March 26, 2013 12:55
-
-
Save georgeOsdDev/5245153 to your computer and use it in GitHub Desktop.
Fixed Footer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Fixed Footer</title> | |
| <meta name="description" content="fixed footer sample"> | |
| <link href="//cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.min.css"> | |
| <link rel="stylesheet" href="style.css"> | |
| </head> | |
| <body> | |
| <div class="header"> | |
| <p>This is header</p> | |
| </div> | |
| <div class="main"> | |
| <h3>Main Contents</h3> | |
| <p>1</p> | |
| <p>2</p> | |
| <p>3</p> | |
| <p>4</p> | |
| <p>5</p> | |
| <p>6</p> | |
| <p>7</p> | |
| <p>8</p> | |
| <p>9</p> | |
| <p>10</p> | |
| <p>1</p> | |
| <p>2</p> | |
| <p>3</p> | |
| <p>4</p> | |
| <p>5</p> | |
| <p>6</p> | |
| <p>7</p> | |
| <p>8</p> | |
| <p>9</p> | |
| <p>10</p> | |
| <h3>Main Contents</h3> | |
| </div> | |
| <div class="footer"><p>© copyright</p></div> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| body { | |
| font-family: Helvetica; | |
| font-size: 18px; | |
| text-align: center; | |
| vertical-align: middle; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| .header{ | |
| background-color: blue; | |
| width:100%; | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| height:60px; | |
| z-index:1000; | |
| } | |
| .main{ | |
| background-color: WhiteSmoke; | |
| padding:60px 0 60px; | |
| overflow: auto; | |
| width:100%; | |
| } | |
| .footer{ | |
| background-color: red; | |
| width:100%; | |
| position: fixed; | |
| bottom: 0; | |
| left: 0; | |
| height:60px; | |
| z-index:1000; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment