Forum Moderators: not2easy

Message Too Old, No Replies

position footer with css: explanations?

problems with IE and Firefox

         

wbagh

10:00 am on Jan 13, 2009 (gmt 0)

10+ Year Member



Hello, I ‘m looking for explanations to position correctly my footer with css.

My code looks like:
<html>
<div id=”container”>
<div id=”footer”>
</div>
</div>
</html>

<style type=”text/css”>
# container{

Position : relative
}
#footer{
width : 100% ;
height : 30px ;
position : absolute ;
bottom : Opx ;
}
</style>

Until now I just succeeded in place it with a fix property: margin-top 1000px;
I would like to position it dynamically whatever the height of my content is, but
IE doesn’t seem to understand properly css properties as {position: absolute; bottom: 0px}
My footer is sticked to the bottom of the window.

I have found some codes which I don’t really understand: what is a voice-family property, which browser understands minheight… but I am looking for solutions to write my own.
Could please someone give me some ideas or tell me in which direction I should search?
Thanks a lot.

swa66

5:39 am on Jan 14, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld! [webmasterworld.com]

Most uses of voice-family I've seen are in hacks to create different interpretation of the CSS in different browsers.
It's far easier to forget about those parser hacks and instead use conditional comments [google.com].

min-height is understood by all browsers more recent than IE6. In some cases IE6 interprets height as min-height, sometimes an expression [google.com] can help, or you can teach IE6 some more manners by giving it IE7.js [google.com]

wbagh

5:17 pm on Jan 14, 2009 (gmt 0)

10+ Year Member



Thank you, swa66
I think I should check every bug I have and write a proper code for each browser, using conditionnal comments, instead of trying to reconcile everything.
Have a nice day.

sectionq

1:03 am on Jan 15, 2009 (gmt 0)

10+ Year Member



Have a look at the thread 'Sticky footer is driving me mad!'
might help?