简体   繁体   English

CSS动态调整大小的div重叠

[英]CSS dynmically resized div overlap

Having some problems with a div on a webpage. 网页上的div出现问题。 In chrome when the browser page is re-sized the div overlaps others and par of it is hidden. 在chrome中,当调整浏览器页面的大小时,div与其他页面重叠,并且其中的par隐藏。 In IE the height:auto works as I would expect it and nothing gets overlapped. 在IE中,height:auto符合我的预期,并且没有任何重叠。 Currently I have tried; 目前我已经尝试过;

height: auto *causes div to overlap below 高度:自动*导致div在下面重叠

height: 510px *does not seem to re-size the div 高度:510像素*似乎无法重新调整div的大小

<div class=parent>
 <div class=child1>
overlapping
 </div>
 <div class=child2>
being overlapped
 </div>
</div>

The problem is a little more complicated than this simple scenario I am outlining. 这个问题比我概述的这种简单方案要复杂得多。 This is actually the MicroStrategy BI application which has a ton of js and a ton of css affecting the page. 这实际上是MicroStrategy BI应用程序,它具有大量的js和大量的CSS影响页面。 So I am attempting to alter these pages. 因此,我试图更改这些页面。 Attached is a jsfiddle of the closes I could get to reproducing the issue. 附件是我可以重现该问题的结束语的摘要。 Unfortunately I was unable to simplify the issue too far down or I wouldn't reproduce it. 不幸的是,我无法将问题简化得太深,否则我将无法重现。

But as you can see the div with ID of List is the one which is overlapping the below div. 但是您可以看到ID为List的div是与下面的div重叠的那个。 This behavior does not happen in IE but only in chrome and firefox. 此行为在IE中不会发生,而只会在chrome和firefox中发生。

http://jsfiddle.net/MF6fR/1/ http://jsfiddle.net/MF6fR/1/

Long story short, I need the div with ID of list to not overlapp the below div 长话短说,我需要列表ID的div不能与下面的div重叠

Perhaps it's a overflow-problem? 也许这是一个溢出问题? Try overflow: hidden; 尝试overflow: hidden; instead of overflow: auto; 而不是overflow: auto; in your .mstrSmallIconView 在您的.mstrSmallIconView

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM