Hey I found this footer tip:
the html
<div id="container">
<div id="content"></div>
<div id="footer"></div>
</div>
the css
*, body {margin: 0; padding: 0;}
#container {display: block; position: absolute; min-height: 100%;}
#content {display: block; margin-bottom: 3em;}
#footer {position: absolute; display: block; bottom: 0; height: 3em }
All works fine... I add a background, color and height to the footer and content so I could see them and the whole thing is sat flush left.
Now is there a way to get over the absolute attribute canceling out margin:0 auto so that the page still centers?
Also I really don't get what absolute means without any coordinates i.e top:100px etc?
Would poistion:relative mean anything on its own? Nothing I've read about css suggests just using these attributes on their own?
Andy
the html
<div id="container">
<div id="content"></div>
<div id="footer"></div>
</div>
the css
*, body {margin: 0; padding: 0;}
#container {display: block; position: absolute; min-height: 100%;}
#content {display: block; margin-bottom: 3em;}
#footer {position: absolute; display: block; bottom: 0; height: 3em }
All works fine... I add a background, color and height to the footer and content so I could see them and the whole thing is sat flush left.
Now is there a way to get over the absolute attribute canceling out margin:0 auto so that the page still centers?
Also I really don't get what absolute means without any coordinates i.e top:100px etc?
Would poistion:relative mean anything on its own? Nothing I've read about css suggests just using these attributes on their own?
Andy