Jump to content

Center Footer/background Image


stkr

Recommended Posts

Hello,I'm trying to line up my footer in the center of my page. In CSS, I've set a background image, as well as the information for my legal notices copyright.Here is the code for my footer:

}#footer {	clear: both;	width: 960px;	height: 50px;	margin: 0 auto;	padding-top: 10px;	border-top: 2px solid #4ba381;	background-image:url(../images/footers/vlfooter.jpg)}#footer p {	margin: 0;	padding: 10;	line-height: normal;	font-size: 77%;}#legal {	float: left;}#links {	float: right;}

Here is the website url: Lost Valley DesignWhile it displays correctly in Firefox, the footer is on the left side in Internet Explorer. Does anyone know how to fix this?Any help is appreciated.

Link to comment
Share on other sites

real quickly, it's definitely worth pointing out that you don't have a doctype defined for your page, and as such it is liable to make things in IE come out wacky.

Link to comment
Share on other sites

For older versions of Internet Explorer, aside from margin: 0 auto, you have to put the footer inside a container with text-align: center;

Link to comment
Share on other sites

Thanks so much to the both of you!! I defined a doctype and it shaped right up! I also added the text-align: center; to my CSS document just in case. Thanks again!

Link to comment
Share on other sites

Really nice looking site, and the cycling background images in the photography section is a nice touch. Great pics, too. What sort of camera do you use?

Link to comment
Share on other sites

Really nice looking site, and the cycling background images in the photography section is a nice touch. Great pics, too. What sort of camera do you use?
Thanks :). I use a Canon Digital Rebel XT.
Link to comment
Share on other sites

Thanks :). I use a Canon Digital Rebel XT.
I have one of those, too, as well as an EOS 450D 12MP. But I've not had much chance to use the latter yet.
Link to comment
Share on other sites

Thanks so much to the both of you!! I defined a doctype and it shaped right up! I also added the text-align: center; to my CSS document just in case. Thanks again!
while you're at it you might want to throw your site through the validator and clean up any wonky code. Site looks nice, it would be a shame for little things to possibly come out funny on other people's browsers.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...