Simplemodal滚动条和关闭图像问题

我有一个simplemodal jquery弹出窗口,必须将溢出设置为auto,因为结果列表可能很长。 滚动条显示正常,但紧密的图像被推到垂直滚动条和simplemodal边框后面。 如果我评论出来的话

overflow: 'auto', 

线条关闭图像在边框顶部显示正常。 我已经尝试将图像的z-index设置得非常高,但没有做任何事情。 它还会使水平滚动条显示,因为关闭图像位于垂直滚动条的后面。

我的jquery代码是

 jQuery('#CustLookupResults').modal({ containerCss: { padding: 0, overflow: 'auto', maxHeight: 800 }, onShow: function (dlg) { $(dlg.container).css('width', 650); $(dlg.container).css('height', 'auto'); }, overlayClose: true, opacity: 75 }); 

我的css是

 #simplemodal-container { border:8px solid; padding: 12px; border-color:Black; border-style:outset; background-color:White; color:Black; vertical-align:middle; text-align:center; } #simplemodal-container a.modalCloseImg { background:url(../images/x.png) no-repeat; /* adjust url as required*/ width:25px; height:29px; display:inline; z-index:3200; position:absolute; top:-15px; right:-18px; cursor:pointer; } 

任何有关如何解决这个问题的帮助将不胜感激。

如果您的数据扩展容器,SimpleModal应该自动向simplemodal-wrap div添加overflow:'auto' 。 如果由于某种原因它不是(由于你如何使用它),你可以做类似的事情:

 jQuery('#CustLookupResults').modal({ containerCss: { padding: 0, width: 650, }, maxHeight: 800, onShow: function (dlg) { $(dlg.container).css('height', 'auto'); $(dlg.wrap).css('overflow', 'auto'); // or try jQuery.modal.update(); }, overlayClose: true, opacity: 75 });