My footer seems as though it has some type of imaginary (Unwanted padding in the top of the footer div... If you need an example of what I mean just visit my site) padding to it. If you view my sample link you will see what I am referring to.
<div id="footer">
<div id="Social">
<img src="img/Follow.png" width="339" height="21" alt="Follow on Social" style="position: relative; display:block;" />
<ul>
<li class="Twitter"><a href="#" target="_blank">Twitter</a></li>
<li class="Facebook"><a href="#" target="_blank">Facebook</a></li>
<li class="Youtube"><a href="#" target="_blank">Youtube</a></li>
<li class="Linkdin"><a href="#" target="_blank">Linkdin</a></li>
</ul>
</div> <!-- Social -->
<div style="clear:both"></div>
</div> <!-- footer -->
My CSS:
#footer {
background-image:url(img/FooterBG.png);
height: 92px;
position: relative;
z-index: 10;
padding: 0 35px;
left: 0px;
top: 82px;
}
#Social {
float: left;
width: 339px;
}
/* Social Links */
.Twitter a {
background-image: url(http://www.nerissagrigsby.com/wp-content/themes/twentytwelve/img/Twitter.png);
overflow: hidden;
text-indent: -999px;
display: block;
width: 42px;
height: 27px;
}
.Twitter a:hover {
background-position-y: 27px;
}
.Facebook a {
background-image: url(http://www.nerissagrigsby.com/wp-content/themes/twentytwelve/img/Facebook.png);
overflow: hidden;
text-indent: -999px;
display: block;
width: 18px;
height: 31px;
}
.Facebook a:hover {
background-position-y: 31px;
}
.Youtube a {
background-image: url(http://www.nerissagrigsby.com/wp-content/themes/twentytwelve/img/YouTube.png);
overflow: hidden;
text-indent: -999px;
display: block;
width: 29px;
height: 30px;
}
.Youtube a:hover {
background-position-y: 30px;
}
.Linkdin a {
background-image: url(http://www.nerissagrigsby.com/wp- content/themes/twentytwelve/img/LinkedIn.png);
overflow: hidden;
text-indent: -999px;
display: block;
width: 28px;
height: 29px;
}
.Linkdin a:hover {
background-position-y: 29px;
}
#Social ul li {
display: inline-block;
margin-right: 24px;
}
#Social ul {
margin: 12px 0 0 0;
padding: 0;
}
How can I remove this padding?
For the most part it is these two settings—Bottom on the Margins tab and Footer on the Layout tab—that together define the distance between the body text and the footer text. You can reduce the distance between the text and the footer by decreasing the Bottom setting and/or increasing the Footer setting.
Adjusting the Margin Size of an HTML Element With CSS This margin is automatically created by some browsers to allow for space between the edges of the viewport and the website content. You can remove this margin by setting the top and left margin to zero.
Margins, on the other hand, are essentially invisible barriers around a box. They define how an element interacts with adjacent elements or the edge of a screen. Margins can be set to zero and above like padding. But unlike padding, margins can also be set to auto and can even have negative values.
Get rid of top: 82px;
#footer {
background-image:url(img/FooterBG.png);
height: 92px;
position: relative;
z-index: 10;
padding: 0 35px;
left: 0px;
/* top: 82px; */
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With