Ensure that the footer remains fixed at the bottom of the grid at all times

Hello everyone, I am trying to make sure that the black line in my footer always stays at the bottom, regardless of the size of the monitor. I am using a grid-based CSS.

I'm not sure if the issue lies within the body?

/* GRID BASED ([{"media":"default","options":  
{"gutter":"0.25","columns":6,"width":"100%"}},{"media":"only screen and (min-width :  
641px)","options":{"gutter":"0.25","columns":10,"width":"90%"}},{"media":"only screen 
and (min-width : 1024px)","options":
{"gutter":"0.25","columns":14,"width":"100%","maxWidth":"1232px"}}]) */

body {
font-family: Arial, Helvetica, sans-serif;
text-align: left;
line-height:157%;
color: #666666;
font-size: 13px;
letter-spacing:0px;
}

body img {
max-width: 100%;
height: auto;
}
body h1 {
font-size: 30px;
font-weight: bold;
color: #333333;
line-height: 120%;
 }
body h2 {
color: #333333;
font-size: 24px;
font-weight: bold;
line-height: 120%;
}
body h3 {
color: #5F5F5F;
font-size: 20px;
font-weight: normal;
line-height: 120%;
}
body h4 {
color: #5F5F5F;
font-size: 14px;
font-weight: bold;
}
body p {
font-size:13px;
color: #666666;
line-height:157%;
}
body a {
color: #0000FF;
font-weight: normal;
text-decoration: none;
font-size: 13px;
line-height:157%;
 }
body a:active, body a:hover {
color: #FF0000;
}
body a:visited {
color: #7A1A8B;
 }
.Header {
clear: both;
min-height: 25px;
width: auto;
background-color:#030303;
}
.main {
clear: both;
min-height: 300px;
width: auto;
}
.footer {
clear: both;
min-height: 21px;
width: auto;
background-color:#030303;
 }
.column_1 {
min-height:25px;
margin-left:auto;
margin-right:auto;
width:96.6666%;
padding-left:1.6667%;
padding-right:1.6667%;
}
.column_2 {
min-height:300px;
margin-left:auto;
margin-right:auto;
width:96.6666%;
padding-left:1.6667%;
padding-right:1.6667%;
}
.column_3 {
min-height:21px;
margin-left:auto;
margin-right:auto;
width:96.6666%;
padding-left:1.6667%;
padding-right:1.6667%;
}
.zeroMargin_mobile {
margin-left: 0;
}
 @media only screen and (min-width : 641px) {
.column_1 {
    width: 88.2000%;
    padding-left:0.9000%;
    padding-right:0.9000%;
    min-height:25px;
}
.column_2 {
    width: 88.2000%;
    padding-left:0.9000%;
    padding-right:0.9000%;
}
.column_3 {
    width: 88.2000%;
    padding-left:0.9000%;
    padding-right:0.9000%;
    min-height:25px;
}
.zeroMargin_tablet {
    margin-left: 0;
}
.Header {
    min-height: 25px;
}
.footer {
    min-height: 25px;
}
}
@media only screen and (min-width : 1024px) {
.column_1 {
    width: 98.5714%;
    padding-left:0.7143%;
    padding-right:0.7143%;
    max-width:1232px;
    min-height:25px;
}
.column_2 {
    width: 98.5714%;
    padding-left:0.7143%;
    padding-right:0.7143%;
    max-width:1232px;
}
.column_3 {
    width: 98.5714%;
    padding-left:0.7143%;
    padding-right:0.7143%;
    max-width:1232px;
    min-height:25px;
}
.zeroMargin_desktop {
    margin-left: 0;
}
.Header {
    min-height: 25px;
}
.footer {
    min-height: 25px;
}
}

HTML

<body>
<div class="Header">
<div class="column_1 gridContainer"></div>
</div>
<div class="main">
<div class="column_2 gridContainer"></div>
</div>
<div class="footer">
<div class="column_3 gridContainer"></div>
</div>
</body>

View it on JSFIDDLE

I would appreciate any help as I have tried solutions from here but they didn't work when I implemented them. Thank you so much!

Answer №1

Your .footer

.footer {
    clear:both;
    min-height: 21px;
    width: auto;
    background-color:#030303;

    position:fixed;
    right:0px;
    left:0px;
    bottom:0px;
}

Answer №2

Have you considered using bottom:0;? I found success with that approach.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

How to Force a jQuery Redraw Following Data Retrieval Using Ajax

Hey everyone, It's been a long time since I started listening, but this is my first post... I have a client who needs a complex feature on their website. They want to merge the content of 3 different pages into one seamless experience for users afte ...

the menu didn't glide into view

I'm currently working on implementing a stylish menu For this project, I am following a helpful guide that instructs to create the HTML in a single file. The issue is that the menu isn't sliding smoothly as expected. Here is the HTML code - no ...

Maintaining the integrity of Jquery Tab even after refreshing the page is essential

I recently started using Jquery and encountered an issue with tab implementation. Whenever I refresh the page, it automatically directs me back to the initial tab setting. $(function() { var indicator = $('#indicator'), i ...

Make sure to employ Bootstrap's justify-content-between and stack-to-horizontal col correctly

I am currently working on a responsive form that contains 1 label, 1 input field, and 5 buttons. Both the buttons and the input field are located under col-8. The positioning I aim for the buttons is as follows: They should start below and align with ...

What is the process for updating button text upon clicking in Angular?

To toggle the text based on whether this.isDisabled is set to false or true, you can implement a function that changes it when the button is clicked. I attempted to use this.btn.value, but encountered an error. import { Component } from '@angular/core ...

Resizing images in Php

I've been working on utilizing the 'jcrop' library to crop an image and sending the coordinates to the server via ajax. However, when I try to make the necessary changes to the image in PHP, the selected area is not always accurate; sometime ...

Examining the process through which an element attains focus

Scenario I am working on a Backbone application that has an event listener set up for focus events on a textarea. Since Backbone relies on jQuery events, my main concern revolves around jQuery focus events. Inquiry Is there a method to determine how an e ...

Content within a scrollable div in IE7 only loads once the user starts scrolling

TL;DR: How can I make IE7 load all hidden elements within a scrollable div? I'm creating a collapsible menu for easy navigation through a series of pages. This menu has two states: collapsed and expanded. Think of the menu items as chapters in a b ...

Interacting with a C# Web Service Using JQuery

I've set up a JSON web service in C# and I'm working on creating a custom HTML page to interact with it. http://localhost:25524/DBService.svc/json/db=TestDB/query=none When I input this URL into my browser, I expect to receive JSON formatted da ...

implementing a jQuery draggable Scrollbar

I'm looking to replicate the feature on this website where they have a scrollable bar at the bottom with a handle that you drag to navigate through the page. I've been searching but can't seem to find anything similar. ...

Tips for Utilizing jQuery each Loop

I am attempting to create a foreach loop that will iterate through hidden values on the page, compare them with an external API using Ajax, and display the API results in a < ul > for example. Sample model ITEM1 metavalue (which needs to be che ...

Redirect with Jquery immediately after the session expires

I am developing a website using ASP.NET MVC and I would like the system to automatically redirect users to the login page after their session has timed out, similar to how Gmail handles it. Currently, I have set up Ajax calls to the controller to check th ...

Choose a particular text node from the element that has been selected

Can anyone provide guidance on how to extract the text "Items Description" from the following HTML snippet using jQuery? <div class="items"> "Items Description" <ul> <li>1. One</li> <li>2. Two</li&g ...

"Error encountered while trying to perform a JavaScript _doPostBack

In my asp.net application, I have an HTML table where each td element has a unique id. When a td element is clicked, I use JavaScript to store the id in a hidden field. After that, I attempt to trigger _doPostBack from JavaScript to utilize the hidden fiel ...

The ticking clock between the beginning and final moments

I am using jQuery and trying to create a countdown timer between a start time and end time. While I have successfully calculated the difference between the two times, I am unsure how to count down the time stored in the difference variable in my code: v ...

Leveraging the X-Send module for efficiently delivering css, javascript, and image files

I am in the process of setting up a file server that currently serves downloadable files such as .doc and .zip perfectly using X-Send. Is it also possible to use X-Send for serving text-based (css/javascript) or image files? I believe this method is quite ...

Is it possible to keep content visible in Bootstrap tab by adding CSS?

Having an issue with the "formbox" class that is causing unexpected behavior when applied to a form. When removed, everything works as expected. I've tried narrowing down the issue by removing each CSS rule individually and testing it out but haven&ap ...

Manipulating Objects with CSS Transform in Global/Local Coordinates

If we take a closer look at our setup: <div id="outside"> <div id="inside">Foo</div> </div> and apply a rotation to the outer element - let's say turning it 45 degrees clockwise: <div id="outside" style="transform: ro ...

Run ajax function prior to changing location; status now marked as canceled

Imagine needing to redirect a page when a button is clicked: <div onClick="clickButton"></div> function clickButton(href) { // an HTTP post request is sent here, without a callback or then/done function sendSomeRequest() location.href ...

Exploring Nested Collections with KnockoutJs in an Asp.net MVC Environment

I have the following .net class: public class JobDetailsDTO { public string JobName { get; set; } public string CompanyName { get; set; } public String[] IndustryName; } I am trying to connect this to a Knockout JS model, but my nested collec ...