Shoutbox

Css Div Centering is being stupid - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Css Div Centering is being stupid (/showthread.php?tid=87210)

Css Div Centering is being stupid by M73A on 11-11-2008 at 01:57 AM

http://people.brunel.ac.uk/~dt08ggm/sliced/divtest2.html

is my 'layout' at the moment

most of the div's are centered using

code:
margin:auto


but when i pin the footer to the bottom edge of the browser with absolute positioning it always stays to the left. how can i center it?

any help appreciated! thanks!

yeah i know it looks a bit naff but im not asking about they design, i need help with the code....

thanks guys.
RE: Css Div Centering is being stupid by NanaFreak on 11-11-2008 at 05:22 AM

well you cant do that easily with position:absolute

though you could if you have a % for the width make the left % 1/2 what is left... if you dont get me... here is an eg:

width:50%; left25%;

that will center the footer for you...

and i really cant see why you are wanting to use absolute for a footer... especially one like that... i would be much easier to just make it what ever is default and just use margin:0 auto;


RE: Css Div Centering is being stupid by M73A on 11-11-2008 at 12:24 PM

quote:
Originally posted by NanaFreak
and i really cant see why you are wanting to use absolute for a footer... especially one like that... i would be much easier to just make it what ever is default and just use margin:0 auto;

because its just floating around underneath the main box if i dont make it absolute to the bottom of the browser

quote:
Originally posted by NanaFreak
width:50%; left25%;

when the window is not maximised they all split up and go crazy