web: sticky footer question
- Started
- Last post
- 4 Responses
- sseo
Does anyone know a way to implement a sticky footer, without making the html and body 100% ? I've already built half a site using ems, and now need to build a footer that will stay at the bottom of the page, regardless of content.
I wouldn't mind using javascript or jquery even, although I don't know much more than basic html and css.
- Daithi0
#footer {
height: 40px;
width: 100%;
position: fixed !important;
bottom: 0;
padding: 0;
}Not a perfect solution by any means — it behaves differently in IE 6 and doesn't work well on iPhone. But it was good enough for me!
- sseo0
Thanks, I'll give it a shot. Also, nice work.
- flashbender0
Give this a shot if the other doesn't work:
- thanks but I'm trying not to use these solutions because of the margins having to be 0. The site I'm working on is already designed.sseo
- designed with margins and padding. Thanks though.sseo
- seeo, it sounds like you are doing something wrong.version3
- What do you mean?sseo
- the issue with this is any v margin ANYWHERE will force perpetual vertical scroll barsacescence
- sseo0
flashbender, I ended up trying that way, and I can live with the vertical scrollbars, as my pages will almost always need it. I didn't try to start with because I misunderstood the issue with margins. It works the way I want now at least. Thanks guys.