Footer/Icon stays at the bottom of screen

I were looking for ways to fix some icons to be shown at the bottom of the screen and came across the following code. I haven’t test the code yet but it should fit my need.

html {
  position: relative;
  min-height: 100%;
}
body {
  margin: 0 0 100px; /* bottom = footer height */
}
footer {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 100px;
  width: 100%;
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s