I have been suffering for a week now, I can’t understand anything, the work is identical in all browsers ...) Thanks in advance for your help. A site is written in which, when you click on the search button, a modal window appears in which the search result is displayed ... The result is shown in 1 image.

site snapshot

Yes, but there is one thing, the cross hid behind the modal window, but there is no scrollbar, although the information goes beyond the limit of the modal window;

site snapshot

Here is the code.

When you click on the search button: onclick="otpravka();"

Sending function:

 function otpravka() { if (xmlHttp.readyState == 4 && xmlHttp.status == 200) { var div = document.getElementById('ModalBox'); div.innerHTML = xmlHttp.responseText; $(document).ready(function () { $('#ModalBox').modal(); return false; }) } } 

Here is a div with a modal window:

 <div id="ModalBox" align="center" class="none" style="z-index:3200;"> </div> 

Here is the CSS to div:

 #simplemodal-container { background-color:#333; border:4px solid #444; color:#bbb; height:550px; overflow-y:hidden; padding:12px; width:60%; z-index:3200; } #simplemodal-container #basic-modal-content { padding:28px; } #simplemodal-container a { color:#FF0; } #simplemodal-container a.modalCloseImg { background:url(img/x.png) no-repeat; cursor:pointer; height:29px; position:absolute; right:0; top:0; width:25px; z-index:5000; } #simplemodal-container p { color:#bbb; } #simplemodal-container td { color:#bbb; } #simplemodal-overlay { background-color:#000; cursor:wait; } #simplemodal-overlayclose { background-color:#FFF; } 

The plug-in library: jquery.simplemodal.js.

    2 answers 2

    overflow:auto; - scrolls will appear only when the text will come out.

    • Thanks, thank you very much! - Eugene536 pm
    • and now the problem with closing the modal window with a button, it is blocked by a modal window, the game with the z-index failed ... - Eugene536
    • Can I see the layout? - ling
    • all the code to throw off the page? - Eugene536
    • No, just a link to the page. - ling
    1. If you have already connected the jquery library, why not use the ajax support built into jqeury

    2. overflow-y: hidden; - it hides vertical scrolling.

    • 1. Jqeury has just begun to study, a habit on its own, but, thank you, I will read and correct this defect. 2. Removed overflow-y: hidden, now the text is outside the modal window, here is [screen] [1]. [1]: s2.ipicture.ru/uploads/20110710/rPAQmU9S.png - Eugene536
    • or may offer other modal windows made by smart), and then I searched the Internet no matter how I looked for, then offered to pick up loud scripts clogging up memory, you cannot close it, you cannot insert tables, scripts in the window are not working, and the width is fixed everywhere is calculated)) .. well, in general, I don’t even know what to do - Eugene536
    • one
      Try instead: overflow-y: hidden; write overflow-y: scroll; - Alex Kapustin