Reputation: 175
gap in between browser window and footer
#footer
{
text-align:center;
clear:both;
background: url("images/footer.png") repeat-x #8DC63F;
width:100%;
margin:0;
}
.footer-text
{
padding: 10px 0 0;
white-space:nowrap;
font-family:'Tahoma';
font-size:10pt;
color: #000000;
}
HTML:
<div id="footer">
<p class="footer-text">Home | Services | About Us | Products | Contact Us</p>
<p class="footer-text">2011 © All Rights Reserved.</p>
<p class="footer-text"> </p>
</div>
Help me to remove the extra space between browser window and footer
Upvotes: 3
Views: 1274
Reputation: 3670
Try using overflow:hidden in #footer.
Also, It would be great if you give us a URL that shows the gap. The problem is that sometimes CSS rules can affect multiple elements, so it's hard to tell what's going on exactly without the entire code.
Hope that helps.
Upvotes: 3
Reputation: 2985
I will recommend you to use a separate div
or br
to clear the floating. That might solve your problem too. Otherwise remove any padding inside the footer to see if this is causing problems.
HTML
<div class="clr"></div>
<div id="footer">
<p class="footer-text">Home | Services | About Us | Products | Contact Us</p>
<p class="footer-text">2011 © All Rights Reserved.</p>
<p class="footer-text"> </p>
</div>
CSS:
.clr {
clear:both;
}
Upvotes: 0
Reputation: 2553
Remove the last <p class="footer-text"> </p>
to remove the gap.
Upvotes: 0
Reputation: 21882
Might be the syntax...
background: #8DC63F url("images/footer.png") repeat-x bottom center;
and
padding: 10px 0 0 0;
I would also remove the non-breaking space paragraph, there's no point to it. If you want more space at the bottom, add padding to the div. Don't use empty paragraphs.
Upvotes: 0