Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7937977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:40:27+00:00 2026-06-03T22:40:27+00:00

This image illustrates my problem: It’s a popup-script from Sohtanaka I think, so what

  • 0

This image illustrates my problem:
enter image description here

It’s a popup-script from Sohtanaka I think, so what you see is a popup-window.
The CSS is looking like this:

#fade { /*--Transparent background layer--*/
    display:none; /*--hidden by default--*/
    background:#000000;
    position:fixed;
    left:0;
    top:0;
    width:100%;
    height:100%;
    opacity:.80;
    z-index:9999;
}

.popup_block{
    display:none; /*--hidden by default--*/
    background:#ffffff;
    padding:20px;
    border:20px solid #dddddd;
    float:left;
    position:absolute;
    top:50%;
    left:50%;
    z-index:99999;
    /*--CSS3 Box Shadows--*/
    -webkit-box-shadow:0px 0px 20px #000000;
    -moz-box-shadow:0px 0px 20px #000000;
    box-shadow:0px 0px 20px #000000;
    /*--CSS3 Rounded Corners--*/
    -webkit-border-radius:10px;
    -moz-border-radius:10px;
    border-radius:10px;
    font-size:12px;
    height:625px;
}

img.btn_close {
    float:right;
    margin:-55px -55px 0 0;
}
/*--Making IE6 Understand Fixed Positioning--*/
*html #fade {
    position:absolute;
}

*html .popup_block {
    position:absolute;
}

And the javascript:

$(document).ready(function(){

    //When you click on a link with class of poplight and the href starts with a # 
    $('a.poplight[href^=#]').click(function() {
        var popID = $(this).attr('rel'); //Get Popup Name
        var popURL = $(this).attr('href'); //Get Popup href to define size

        //Pull Query & Variables from href URL
        var query= popURL.split('?');
        var dim= query[1].split('&');
        var popWidth = dim[0].split('=')[1]; //Gets the first query string value

        //Fade in the Popup and add close button
        $('#' + popID).fadeIn().css({ 'width': Number( popWidth ) }).prepend('<a href="#" class="close"><img src="../images/close_pop.png" class="btn_close" title="Close Window" alt="Close" /></a>');

        //Define margin for center alignment (vertical + horizontal) - we add 80 to the height/width to accomodate for the padding + border width defined in the css
        var popMargTop = ($('#' + popID).height() + 80) / 2;
        var popMargLeft = ($('#' + popID).width() + 80) / 2;

        //Apply Margin to Popup
        $('#' + popID).css({ 
            'margin-top' : -popMargTop,
            'margin-left' : -popMargLeft
        });

        //Fade in Background
        $('body').append('<div id="fade"></div>'); //Add the fade layer to bottom of the body tag.
        $('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn(); //Fade in the fade layer 

        return false;
    });


    //Close Popups and Fade Layer
    $('a.close, #fade').live('click', function() { //When clicking on the close or fade layer...
        $('#fade , .popup_block').fadeOut(function() {
            $('#fade, a.close').remove();  
    }); //fade them both out

        return false;
    });         

});

The first picture is when I use the CSS as I linked below. Everything’s working, and the close-cross in the upper right is there and working. Problem is, that I have made a fixed height on the popup, and according to the ID linked to the popup window, stuff inside it could be more, and it could be less. So, the fixed height is not always enough, which you can see in the bottom of the first picture, where content is actually going outside the window frame.

Well, then I tried using overflow:auto (I know I should overflow-y for scrollbar in the sides, but the other picture is just with overflow, so bear with me ;)), and I got the other picture. I then get a scrollbar inside the window, and I can easily scroll to see the other content, as it should be (Again, ignore the x-scrollbar). But, unfortunately, not the close-cross-button don’t want to show as before, but instead hide behind the borders.

I’ve tried some things with enclosing the button in the javascript in a div, and then position that, but that didn’t seem to work the way I did it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T22:40:29+00:00Added an answer on June 3, 2026 at 10:40 pm

    I found a solution for you. Add a new division inside the popup_block and give overflow to it. Then you can see the close image correctly. I had created two jsfiddle examples. One with less content and other with more content.

    Example with more content

    Example with less content

    I had adjusted some CSS also. Close image added externally.

    Hope this will solve your problem.

    Cheers !!!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This image best illustrates the problem: I'm customizing a WordPress theme that uses SuperBGImage.
See this Image below http://i46.tinypic.com/2pt6jkn.jpg This is report in SSRS as shown when it
I want to get this image uploading script right, but for whatever reason it
I have this image: In this image I have 11 shapes (look like ellipses).
This image should illustrate the problem quite well: ( Fullsize ) As you can
I've added the following image to help illustrate the problem better: Hi, I'm looking
Please see the attached screenshot which illustrates a TToolBar from one of my programs:
Suppose I have this image: <img src=images/01.jpg border=0 rel=shadow /> Then with jQuery, I
according to this image, i try to save data in NSUserDefaults but my App
Please look at this image here is 3 tables , and out i want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.