My CSS code includes media queries to make my footer responsive for smaller screens:
#footer-top {
width:100%;
height:480px;
padding-top:10px;
border-bottom:2px #000000 solid;
}
#footer-left {
width: 290px;
float: left;
padding: 5px 15px;
border-right:1px #000000 solid;
}
#footer-middle {
width: 294px; /* Account for margins + border values */
float: left;
padding: 5px 15px;
margin: 0px 5px 5px 5px;
border-right:1px #000000 solid;
}
#footer-right {
width: 270px;
padding: 5px 15px;
float: left;
}
#footer-bottom {
clear: both;
padding: 0 15px;
}
/* Adjustments for screen sizes below the specified limits */
@media screen and (max-width: 980px) {
#footer-left {
width: 41%;
padding: 1% 4%;
}
#footer-middle {
width: 41%;
padding: 1% 4%;
margin: 0px 0px 5px 5px;
float: right;
}
#footer-right {
clear: both;
padding: 1% 4%;
width: auto;
float: none;
}
#footer-bottom {
padding: 1% 4%;
}
}
@media screen and (max-width: 600px) {
#footer-left {
width: auto;
float: none;
}
#footer-middle {
width: auto;
float: none;
margin-left: 0px;
}
#footer-right {
width: auto;
float: none;
}
}
@media screen and (max-width: 480px) {
#footer-right {
display: none;
}
}
I have also provided a fiddle here:http://jsfiddle.net/VMn7Y/ with the full HTML for better context. However, when shrinking the screen size, the footer-right div overlaps the footer-bottom div. How can I ensure that as the screen size decreases, the footer-bottom div is pushed down accordingly?