Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Footers in css


  • Please log in to reply

#1
glen_m_32

glen_m_32

    Member

  • Member
  • PipPipPip
  • 255 posts
Hi,

I have heard that footers in CSS are a nightmare, but would like to know if anyone has a proven method for footers in CSS and HTML?

Thanks once again

Glen
  • 0

Advertisements


#2
thenotch

thenotch

    Member

  • Retired Staff
  • 667 posts
Define what a nightmare would be?

A footer is no big deal depending on what you want it to do. It's jsut CSS the same as the rest...
  • 0

#3
glen_m_32

glen_m_32

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 255 posts
Sorry for my lack of information, But what i mean by nightmare is that i would like the footer to stay at the bottom of the page, below content, But sometimes the content is not big enough to fill a whole page, but i want the footer to be on the bottom of the window.

Does that make sence?

Cheers!
  • 0

#4
thenotch

thenotch

    Member

  • Retired Staff
  • 667 posts
Yeah, thats normally what folks want. It's not very difficult at all... this is a great place to start:

http://alistapart.com/articles/footers

A lot of folks shun absolute positioning, for good reason, but sometimes you gotta do what you gotta do :whistling:
  • 0

#5
Michael

Michael

    Retired Staff

  • Retired Staff
  • 1,869 posts
I did it easily, just used this.

html>body{
height:auto;
top:0
}
body,html,#footer{
width:100%
}
body,html{
min-height:100%;
height:100%
}
body,#footer{
position:absolute;
left:0
}
#footer{
bottom:0;
text-align:center;
}

It is the absolute positioned element in another absolute positioned element that does the trick.

The code is very much like what thenotch linked to.

Edited by Michael, 09 January 2007 - 05:11 PM.

  • 0

#6
glen_m_32

glen_m_32

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 255 posts
That has helped for one of my websites, but i am having issues with http://www.nadinesflorist.co.uk the footer keeps appearing in the middle of the page, not the bottom of the content.

The css can be found at http://www.nadinesfl....uk/css/css.css

Can you see anything wrong with that?

Thanks again :whistling:
  • 0

#7
Michael

Michael

    Retired Staff

  • Retired Staff
  • 1,869 posts
It is the position:absolute on the #content You will have to find another method of putting that where you want it.
  • 0

#8
Michael

Michael

    Retired Staff

  • Retired Staff
  • 1,869 posts
dubble

Edited by Michael, 11 January 2007 - 06:08 PM.

  • 0

#9
glen_m_32

glen_m_32

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 255 posts
That explains alot.

Thank you so much, you are great!

Edited by glen_m_32, 12 January 2007 - 04:18 AM.

  • 0

#10
glen_m_32

glen_m_32

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 255 posts
has anyone got any ideas how to position my content without using "postion:absolute;"

I have tried a couple of things but not ver successful!
  • 0

Advertisements


#11
thenotch

thenotch

    Member

  • Retired Staff
  • 667 posts

has anyone got any ideas how to position my content without using "postion:absolute;"

I have tried a couple of things but not ver successful!



Have you tried using the float option and then adjusting the margins accordingly?
  • 0

#12
glen_m_32

glen_m_32

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 255 posts
i will give it a go as soon as i can, and let you know.

To be honest, i've never used that option, thanks for the help!
  • 0

#13
thenotch

thenotch

    Member

  • Retired Staff
  • 667 posts
Floating is just a means of having an object locate itself at a certain point without making it absolute.

Float a DIV and then adjust the margins to position wherever you wish on the screen.
  • 0

#14
glen_m_32

glen_m_32

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 255 posts
Thank you, i will give it a go in a sec, once i get apache and PHP working correctly on this laptop! I'm getting feed up of keep uploading the files everytime i make a change!

Do you have any experience with Apache2 PHP4 and MySql set up?
  • 0

#15
Michael

Michael

    Retired Staff

  • Retired Staff
  • 1,869 posts
If I had not just formated I would have them all installed.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP