How to Create A Sticky Footer With CSS

Create a fixed footer with CSS

A sticky footer is a great way to encourage people to subscribe to your website’s newsletter, get more eyes on your advertisements or post short and important updates for your visitors.

The difference between a sticky header and a sticky footer is that the footer doesn’t take up “prime real estate” on your blog’s page in the same way that a header does. Visitor’s eyes will naturally make their way down to the footer as they read through your content and it’s not disruptive to their viewing.

What is a sticky footer?

Typically, it’s a bar that runs along the bottom of your webpage, even when scrolling.

Create a fixed footer with CSS

View the live demo here .

The Method

Let’s start out by creating a HTML webpage.

<html>
<head>
<title>My Webpage</title>
<style type="text/css">
</style>
</head>
<body>
Your webpage content goes here. To be able to test the functions of your fixed footer correctly, you need to have enough content so that when viewing you are required to scroll down the page to continue reading.
</body>
</html>

Next, we’ll add the footer div layer to the page.

<html>
<head>
<title>My Webpage</title>
<style type="text/css">
</head>
<body>
Your webpage content goes here. To be able to test the functions of your fixed footer correctly, you need to have enough content so that when viewing you are required to scroll down the page to continue reading.
<div id="footer">
Your fixed footer content goes here. You can use web forms, images, javascript code or whatever you want!
</div>
</body>
</html>

Now that we’ve got the basic set up for your webpage, we will rely on CSS to do the rest of the work. Use the following code in your style.css file or include it in between the script tags I have used above.

I am going to include a little styling for mine, which is optional for you.

body {
background-color: #e4e4e4; /* Styling */
font-family: 'Arial', sans-serif; /* Styling */
font-size: 17px; /* Styling */
}

#footer {
position: fixed;
bottom: 0px;
width: 100%;
overflow: visible;
z-index: 99;
height:40px;
left: 0px;
padding: 5px; /* Styling */
border-top: 2px solid #000000; /* Styling */
background-color: #ffffff; /* Styling */
text-align: center; /* Styling */
}

Not only do you now have a sticky footer on your screen, but it’s also mobile responsive. Keep in mind that you will have to add some additional styling for mobile view if you want the viewer to be able to see what is in the footer. Widths should be set to 100% and heights to auto to ensure it shrinks to size correctly.

Top 10 tools to convert HTML to PDF

PDF (Portable Document Formal) is a useful document format, and as the name portable. Once a document is converted to the PDF format, its formatting remains the same when viewed across a range of devices, irrespective of the platform. Due to its usability, there is often a need to convert documents from various formats to PDF. Webpages, which are basically HTML documents, belong to the same category.

Thus, we present 10 HTML to PDF converters with range of functionalites associated with each one.Continue Reading

Creating animated loaders with CSS3 Animation

spinkit

Introduction

Loaders and Spinners play an important role in the modern dynamic websites. Though they look simple but they play a very important role in simplifying the overall User Experience. There are a lot of ways to create animated loaders, however in this post I will be using the power of CSS3 to create 3 different spinners.

You can view all the working loaders and spinners by clicking “vKIAp” button below. Before we dig in to it, lets find out what CSS3 properties are required to build them.

See the Pen vKIAp by Mohit Bhansali (@mohitbhansali) on CodePen.Continue Reading

Create Your Own Mobile Responsive Masonry (Pinterest Style) Content Grid

Traditional Grid - Create Your Own Mobile Responsive Masonry (Pinterest Style) Content Grid

With Pinterest coming out of the woodwork and taking social media by storm in the recent months, it’s apparent that a lot of it’s popularity is down to it’s aesthetically pleasing layout. Pinterest’s “grid view” style for displaying pins is what the design world refers to as a Masonry Grid.

Masonry Grids are different from normal grids in that they do not have to be the same size as each other (like traditional grids created with CSS & HTML) and they slot in perfectly with each other despite their different lengths.

Traditional Grid

Traditional Grid - Create Your Own Mobile Responsive Masonry (Pinterest Style) Content Grid

Masonry Grid

Masonry Grid - Create Your Own Mobile Responsive Masonry (Pinterest Style) Content GridContinue Reading