多个div不扩展以适应动态内容IE

时间:2011-08-10 15:31:48

标签: jquery html css internet-explorer

我一直在努力解决这个CSS问题一段时间没有在线答案似乎对我有用(过去几天我花了很多时间阅读这篇文章)。

我遇到的问题是有三个div包含动态内容,并且随着内容的增长(内容在开头隐藏,然后通过点击每个部分的标题逐渐显示Jquery)divs不像其他浏览器(包括FF 3.0)那样正确扩展。

我尝试了min-height,溢出:auto,overflow:hidden,height:100%,一切。使用overflow:auto,我得到滚动条,只有一个div在滚动条内正确调整。随着溢出:隐藏内容只是隐藏,呃哈哈。最小高度和高度除了让内容溢出外什么也没做。

以下是三个div的CSS:

// outher div, it's floating left next to a leftbar
div#conwrap {
  background: #C0E7F4;
  width: 810px;
  margin: 0;
  float: left;
}

/* For 2 column layout */
div#main_wide {
    margin: 20px 20px 20px 20px;
}

// Inner div. The main one I want to expand.
div.round {
  -moz-border-radius-topleft:15px;
  -moz-border-radius-topright:15px;
  -moz-border-radius-bottomleft:15px;
  -moz-border-radius-bottomright:15px;
  -webkit-border-top-left-radius:15px;
  -webkit-border-top-right-radius:15px;
  -webkit-border-bottom-left-radius:15px;
  -webkit-border-bottom-right-radius:15px;
  background: #fff;
  padding: 10px;
  margin: 0 0 0px 0;
}

然后是div.round里面内容的html:

/* Block for education details */
<h3 class="edit_type" id="education">Education</h3> 
<ul>...</ul>
<div class="clear"></div>

/* Block for account details */  
<h3 class="edit_type" id="account">Account</h3>
<ul>...</ul>
<div class="clear"></div>

依此类推......(还有三个街区)

使用Jquery,所有的uls都隐藏在开头,然后在你点击h3时显示或隐藏。

任何帮助? 非常感谢!!!!!!

1 个答案:

答案 0 :(得分:0)

height:auto;指定给可能有帮助的内部div。

相关问题