Jump to content


css footer float help


2 replies to this topic

#1 jamiecarter

    Young Padawan

  • Members
  • Pip
  • 85 posts

Posted 10 August 2006 - 09:30 AM

Hi.. basically im trying to acheive what pixel2life has with its footer...

Currently i have 3 divs

div 1 = left image (for a curve effect)
div 2 = right image (for curve effect)
div 3 = links to other pages

div 1 + 2 sit perfectly but the trouble im having is with centreing the links div in the remaining space..

i have done what i thort i would need to do, but in firefox the "margin-top" on div3 doesnt work so my text is right at the top.. i've tried to float the div left but then its vetically centred but not horizontally centred.

heres my html

<div id="footer">
	   <div id="footer_leftimage"></div>
	   <div id="footer_rightimage"></div>
	   <div id="footer_links" align="center">
			<font class="size12white">Home | News | Spotlight | Latest Additions | User Feed | Contact | Forum |</font><font class="size12lightgrey"> © 2006 - 2008 Copyright Incoming Sound Inc.</font></p>
	   </div>
  </div>

and my css

#footer_leftimage{
  width:7px;
  height:32px;
  float:left;
  background-image:url(images/footer_leftimage.png);
}

#footer_rightimage{
  width:7px;
  height:32px;
  float:right;
  background-image:url(images/footer_rightimage.png);
}

#footer_links{
  width:680px;
  height:16px;
  margin-top:8px;
  margin-left:auto;
  margin-right:auto;
}

any ideas?

#2 Jacorre

    P2L Jedi

  • Members
  • PipPipPip
  • 824 posts
  • Gender:Male
  • Location:USA
  • Interests:Computers, Technology, Internet, Graphic/Web Design, Music, Soccer

Posted 10 August 2006 - 10:14 AM

Have you tried adding a line height to the footer div that's the same height as itself? That centers things within the div. You may want to get rid of the top margins if you try this.

#3 jamiecarter

    Young Padawan

  • Members
  • Pip
  • 85 posts

Posted 10 August 2006 - 10:28 AM

your the man!

thx so much mate, you've just saved me about 15lines of code in total
greatly appreciated you've made me a very happy man

thx alot

Jamie

Edited by jamiecarter, 10 August 2006 - 10:29 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users