开发者

Content expands vertically in IE but has a scrollbar in Firefox

In my popup I have fixed the size, and if the inside content is larger there should come a vertical scrollbar, It works fine in firefox (though i only want vertical scrool bars) but does not work in IE(using IE 8). Below are the images. What could be the problem?

Content expands vertically in IE but has a scrollbar in Firefox

Content expands vertically in IE but has a scrollbar in Firefox

My CSS code

#compareParentDiv
{ 
overflow-y: auto;
//overflow-x: hidden; 
max-height: 380px;
width:100%
} 

My Div

$('#compareContent').empty();
    $('<div id="compareParentDiv" width="100%">'+
      '<table id="list2" cellspacing="0" cellpadding="0"></table>开发者_JAVA技巧'+
            '<div id="gridpager2"></div></div>')
    .appendTo('#compareContent');


Look into overflow-y:scroll or overflow-y:auto, apply it on the element that should scroll.

If set to scroll scrollbars are always visible, if set to auto it's up to the browser but I believe that all browsers provide a scrollbar when needed but not otherwise.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜