Centering popup div

  • Author
  • #795663


    Been puzzling al morning, but I can’t figure this one out.

    I got a pop-up working on my blog. I wanna use this to popup a bigger version of a picture, which it does.

    If you scroll down to 2, you’ll see that it doesn’t center vertically, what you now see is just an absolute position. How can I make it center horizontally?

    Would be nice if the div would also center horizontally and/or adjust to fit it contents, but that’s just a bonus.

    This is the css for the popup div:
    .endomondo {
    visibility: hidden;
    background: white;
    border-style: solid;
    border-width: 1px;
    border-color: red;
    position: absolute;
    top: -178px;
    left: -220px;
    width: 1200px;
    height: 825px;
    text-align: center;

    Thanks in advance!



    You did not specify a blog address or reason for posting when you created this topic.

    This support forum is for blogs hosted at If your question is about a self-hosted WordPress blog then you’ll find help at the forums.

    If you don’t understand the difference between and, you may find this information helpful.

    If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.

    This is an automated message.



    sorry, wrong forum

The topic ‘Centering popup div’ is closed to new replies.