What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Problems with vertically centering a DIV

Problems with vertically centering a DIV
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
O.P. RE: RE: Problems with vertically centering a DIV
quote:
Originally posted by Adeptus
This is where CSS fails and tables, as allergic to their usage as you might be, are a whole lot simpler.
On the contrary, I'm more allergic to this whole css ordeal than tables. :p But I wanted to 'simplify' the used tables a bit because the original creator used a _hell_ of a lot nested tables (that is, the program he used, Dreamwaver, has put them there). Guess I came to a point where it can't be 'simplified' anymore...

quote:
Originally posted by Adeptus
I am not even closely following what you are trying to do, but if you are going to vertically center anything, your HTML and BODY both need to be height: 100%.
I'm not vertically centering stuff on a page. I want to vertically center text (other divs) inside a table cell of which the width and height is known, and taking advantage of the margin/padding and overflow attributes (which was otherwise done with a lot more table cells and stuff).

quote:
Originally posted by NanaFreak
quite sure this is what you want:

Code snipped

:) works with same style and doctype

also i know it is making the divs fake being a table, its what you used in your dodgy hax version, this is just a whole heap neater than that =p
Ah, yeah I got the 'hax' version from a website. Your version seems a lot better, tbh, it looks too good to be correct :p
I'll test it tonight when I get home....
thanks

EDIT: tested it at work: doesn't work (besides that there was a </div> too much). The output is the same as my first code in this thread; it doesn't vertically align de three texts....

This post was edited on 05-27-2009 at 08:50 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
05-27-2009 08:27 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Problems with vertically centering a DIV - by CookieRevised on 05-27-2009 at 04:53 AM
RE: Problems with vertically centering a DIV - by Adeptus on 05-27-2009 at 06:48 AM
RE: Problems with vertically centering a DIV - by NanaFreak on 05-27-2009 at 06:52 AM
RE: RE: Problems with vertically centering a DIV - by CookieRevised on 05-27-2009 at 08:27 AM
RE: Problems with vertically centering a DIV - by NanaFreak on 05-27-2009 at 08:37 AM
RE: Problems with vertically centering a DIV - by CookieRevised on 05-27-2009 at 08:55 AM
RE: Problems with vertically centering a DIV - by NanaFreak on 05-27-2009 at 09:25 AM


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