What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Css Div Centering is being stupid

Css Div Centering is being stupid
Author: Message:
M73A
Veteran Member
*****

Avatar


Posts: 3213
Reputation: 37
34 / Male / Flag
Joined: Jul 2004
O.P. Css Div Centering is being stupid
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.

[Image: lost7ru.gif]
11-11-2008 01:57 AM
Profile E-Mail PM Find Quote Report
NanaFreak
Scripting Contest Winner
*****


Posts: 1476
Reputation: 53
32 / Male / Flag
Joined: Jul 2006
RE: Css Div Centering is being stupid
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;
11-11-2008 05:22 AM
Profile PM Find Quote Report
M73A
Veteran Member
*****

Avatar


Posts: 3213
Reputation: 37
34 / Male / Flag
Joined: Jul 2004
O.P. RE: Css Div Centering is being stupid
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

This post was edited on 11-11-2008 at 12:26 PM by M73A.

[Image: lost7ru.gif]
11-11-2008 12:24 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On