Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2012
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Vertically center a div.

    I know this has been asked again and again but after much searching on Google and numerous attempts myself, I am unable to come up with a solution that works.

    I am trying to center a DIV vertically inside of another DIV. The outer DIV has a height that is set using document.documentElement.clientHieght. The inner DIV's height is variable and unknown.

    Any help is appreciated. Thanks

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Have a look at this dead centre.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New Coder
    Join Date
    Jun 2012
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks, I managed to rewrite it from the ground up quickly enough and resolved the issue.


  •  

    Posting Permissions

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