SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Dec 2003
    Location
    South Korea
    Posts
    232
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Vertical Centering...

    Im wondering how i would go about positioning something in the center of the screen. I've searched the forums and found how to center IF you have the width and height of the thing your centering. However, what i want to center is a table in a <div> layer which doesn't have a set height. Furthermore, this table shows up on a Mouseover or OnClick. Lastly, i want this table to center even if there's scrolling. This means, even if you scroll down or up, the table stays in the center nonetheless. The part about it centering even if scrolled is to be the most important factor. ANY help is appreciated. Thanks.
    Last edited by tommychi; Aug 28, 2004 at 06:07.

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We're covering all that in your other thread - except for one thing... If you want to center something it has to have a width and height. They don't have to be hard-coded - but you do have to find them (perhaps with element.offsetWidth, etc).


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •