Solved

CSS weird image padding on bottom

Posted on 2009-04-02
3
594 Views
Last Modified: 2012-06-27
I'm having a problem with getting my footer to align to the very bottom of my page. I've already tried padding:0 and margin: 0 and it doesn't work. The problem is directly related to the image in the footer because if I remove it the divs go all the way to the bottom of the page like they are supposed to.
<div align="center" style="clear: both; vertical-align: bottom;">
<div style="width: 98%;">
<br />
<br />
<br />
<div id="Footer" style="position: relative; padding: 10px; height: 30px;">
<div style="float: left; text-align: left;">
<a href="contact1.asp">Contact us</a> / <a href="faqs.asp">FAQ</a>
</div>
<div style="float: right;  text-align: right; padding-right: 70px;">
<a href="../privacypolicy.asp">Privacy Policy</a><br />
All content and designs &copy; 2001-2009 Bodyartforms LLC unless otherwise stated
</div>
</div>
<a href="http://www.bbbonline.org/cks.asp?id=10508179342">
<img src="images/logo_BBB_Footer.png" alt="BBB" style="position: relative; z-index: 10; float: right; padding-right: 10px; top: -65px;" />
</a>
</div>
</div>

Open in new window

0
Comment
Question by:twentythree
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Expert Comment

by:dr_lionheart
ID: 24055105
i did not get your idea yet
but replace your footer div with this
<div id="Footer" style="position: relative; padding: 10px; height: 30px;margin-bottom: 0;padding-bottom:0;">

Open in new window

0
 
LVL 9

Expert Comment

by:unassassinable
ID: 24056679
The footer dive needs to be in its own area outside of your content divs.   Ive recoded it for you as the code was a bit sloppy, now it should be a bit more readable and you should understand it pretty easy.

I dont know where your trying to put your image, but it seems your issue was wanting to have the footer be at the bottom.  Now it is.  If you need help with the image placement, I can help further if you can describe what your trying to do with it :)

Cheers,

Rich
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
.content {clear: both; vertical-align: bottom;}
.left_side {width: 98%;}
.footer {position: relative; padding: 10px; height: 30px;}
.left_footer {float: left; text-align: left;}
.right_footer {float: right;  text-align: right; margin-right: 70px;}
.image {}
 
</style>
 
</head>
 
<body>
 
<div class="content">
	<div class="left_side">
		<br />
		<br />
		<br />
		
        <a href="http://www.bbbonline.org/cks.asp?id=10508179342">
            <img class="image" src="images/logo_BBB_Footer.png" alt="BBB" />
        </a>
    </div>
</div>
 
<div class="footer">  
	<div class="left_footer">
		<a href="contact1.asp">Contact us</a> / <a href="faqs.asp">FAQ</a>
	</div>
	<div class="right_footer">
		<a href="../privacypolicy.asp">Privacy Policy</a><br />
					All content and designs &copy; 2001-2009 Bodyartforms LLC unless otherwise stated
	</div>
</div>
 
 
</body>
</html>

Open in new window

0
 

Accepted Solution

by:
twentythree earned 0 total points
ID: 24170507
I actually fixed this out myself... I just needed to make the image be absolute positioned rather than relative and it eliminated the space that was showing up below it.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
The viewer will learn how to dynamically set the form action using jQuery.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question