Skip to content

Latest commit

 

History

History
55 lines (46 loc) · 962 Bytes

footercss.md

File metadata and controls

55 lines (46 loc) · 962 Bytes

How to write footer with CSS Back

  • here is an example of writing footer whose height is 97px:
<body>
    <div class="container"></div>
    <div id="footer"></div>
</body>
* {
	margin: 0;
}

/**
 * html
 */
html {
    height: 100%;
}

/**
 * body
 */
body {
    min-height: 100%;
    height: auto !important;
    height: 100%;
    width: 100%;
    position: relative;
}

/**
 * container
 */
.container {
    padding-bottom: 97px;
}

/**
 * footer
 */
#footer {
    height: 97px;
    width: 100%;
    background-color: #000;
}

Demo

See the Pen bpbmKd by aleen42 (@aleen42) on CodePen.

<script async src="//assets.codepen.io/assets/embed/ei.js"></script>