I just wanna center a div!

Out of context: Reply #21

  • Started
  • Last post
  • 39 Responses
  • lumedia0

    BUMP, follow up on this post. I am doing the same thing with the following code:

    #center {
    position: absolute;
    left:50%;
    top:50%;
    margin-left: -425px;
    margin-top: -360px;
    height: 720px;
    width: 850px;
    text-align: center;
    }

    it works but the problem is that if the browser window is too small the top of the content gets cropped off the top of the page. See link, and make the browser window small:

    http://kylepero.com/

    Anyone care to enlighten me on how to fix this? Would really appreciate the help. I cant find anything that helps.

View thread