开发者

IE7 not expanding div to fit ajax-loaded content

I'm loading content into a series of divs using $.load(), and it works fine in firefox and chrome. In IE7 the page isn't redrawn af开发者_C百科ter the content is loaded, so most of the content is cropped. I've read a number of related posts but none of them contains a fix for me. The js, slightly simplified:

$('#zoomedInLinks').load("links.cfm");
$('#zoomedInContent').load("content.cfm"); 

The pages loaded are coldfusion templates and the markup they contain has nothing odd about it (the page itself has transitional doctype). The html with placeholder divs:

<div id="zoomedInLinks" class="hasContent"></div>
<div id="zoomedInContent" class="hasContent"></div>

css, added after reading about a couple of possible fixes :

.hasContent {
  zoom: 1;
  height: auto;
  overflow: auto;
}

I've tried altering the css before using load, and using $.get() and innerHTML instead, none of which helps. Any ideas? Ta.


A friend of mine finally found the answer to this -- jQuery was inserting a style in IE 6 and 7 that set a fixed width on one of the container divs holding the content for some reason. Overriding that fixed the problem.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜