Skip to content Skip to sidebar Skip to footer

Jquery, Change Div Height To Automatically Fill Out Remainder Of Screen If Content Isn't Already Larger

My site is structured roughly like this: ----------------- header ----------------- | | side| main | | -----------------

Solution 1:

The method is called sticky footer, and you don't need jQuery for that. You can use CSS:

[See it in action]

/* 
Sticky Footer by Ryan Fait
http://ryanfait.com/sticky-footer/ 
*/

* {
 margin: 0;
}
html, body {
 height: 100%;
}
.wrapper {
 min-height: 100%;
 height: auto !important;
 height: 100%;
 margin: 0 auto -142px; /* the bottom margin is the negative 
                              value of the footer's height */
}
.footer, .push {
 height: 142px; /* .push must be the same height as .footer */
}

Post a Comment for "Jquery, Change Div Height To Automatically Fill Out Remainder Of Screen If Content Isn't Already Larger"