Html Div高度不适用于动态内容IE

Html Div高度不适用于动态内容IE,html,css,internet-explorer,cross-browser,Html,Css,Internet Explorer,Cross Browser,我有一个脚本,可以将google charts api信息加载到一个div中。这个div有一个固定的高度和一个滚动属性。但是,当从google加载表时,它会溢出div(参见下图)。这是在IE 8上的兼容模式,css如下所示: div.dashwrapper .no_overflow{overflow-x: hidden; overflow-y: scroll; height: 300px;} 以下是IE8中的外观(蓝色轮廓来自开发人员工具,但它勾勒出了div的高度) 这就是它在Firefox

我有一个脚本,可以将google charts api信息加载到一个div中。这个div有一个固定的高度和一个滚动属性。但是,当从google加载表时,它会溢出div(参见下图)。这是在IE 8上的兼容模式,css如下所示:

div.dashwrapper .no_overflow{overflow-x: hidden; overflow-y: scroll; height: 300px;}
以下是IE8中的外观(蓝色轮廓来自开发人员工具,但它勾勒出了div的高度)

这就是它在Firefox中的样子(应该是什么样子)

以下是它的HTML/Javascript:

<script>
var table = new google.visualization.Table(document.getElementById('chain_info_this_year'));
    table.draw(data , {showRowNumber: true});

    data = new google.visualization.DataTable();
    data.addColumn('string', 'Store Name');
    data.addColumn('string', 'Chain');
    data.addColumn('number', 'Intakes <?php echo date("F");?>');
    data.addColumn('number', 'Ships <?php echo date("F");?>');
    data.addColumn('number', 'Intakes <?php echo date("Y");?>');
    data.addColumn('number', 'Ships <?php echo date("Y");?>');
    data.addRows([
                <?php 
                for ($i = 0; $i < count($store_info); $i++)
                {
                    
                    if ($i <count($store_info) - 1)
                        echo "['" . str_replace("'", '',$store_info[$i]['chain']) . "', '" . str_replace("'", '', $store_info[$i]['store']). "', "  . $store_info[$i]['intakes_this_month'] . "," 
                            . $store_info[$i]['ships_this_month'] . "," . $store_info[$i]['intakes_this_year'] . "," . $store_info[$i]['ships_this_year'] . "],";   
                    else 
                        echo "['" . str_replace("'", '',$store_info[$i]['chain']) . "', '" . str_replace("'", '', $store_info[$i]['store']). "', "  . $store_info[$i]['intakes_this_month'] . "," 
                                . $store_info[$i]['ships_this_month'] . "," . $store_info[$i]['intakes_this_year'] . "," . $store_info[$i]['ships_this_year'] . "]";
                }
                ?>
                ]);
            var table = new google.visualization.Table(document.getElementById('store_info'));
    table.draw(data , {showRowNumber: true});

    </script>
    <div class='dash_row no_overflow'>
    <div class='dash_mod full_width'>
        <div class='title'>Store Information <span class='small_text space_left'><a style='cursor: pointer' onclick = "expand();">Show All</a></span></div>
        <div class='mod_content'><span id='store_info'></span></div>
    </div>
</div>

var table=新的google.visualization.table(document.getElementById('chain\u info\u this\u year');
table.draw(数据,{showRowNumber:true});
data=new google.visualization.DataTable();
data.addColumn('string','storename');
data.addColumn('string','Chain');
data.addColumn(‘数量’、‘摄入量’);
data.addColumn('number','Ships');
data.addColumn(‘数量’、‘摄入量’);
data.addColumn('number','Ships');
data.addRows([

我找到的唯一解决方案是在加载内容后使用JQuery重置css height属性。这显然是因为,IE 8在兼容模式下呈现css,然后用动态内容忽略它。

也请给html代码一个“溢出:隐藏”处理包含的div?请使用一个代码示例。例如,感谢帮助,添加了HTML。@Mike,overflow:hidden不起作用,因为我需要能够滚动整个表。这与IE忽略动态生成内容的高度属性有关。例如,div是使用设置的高度创建的,但是数据从谷歌图表api被插入,高度被忽略。这里是一个例子,图表api不是在小提琴工作,我将不得不检查,并确保我复制了所有在一点点。这是相当接近。