Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/87.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html IE8表浮点和父Div_Html_Css_Internet Explorer 8 - Fatal编程技术网

Html IE8表浮点和父Div

Html IE8表浮点和父Div,html,css,internet-explorer-8,Html,Css,Internet Explorer 8,在IE8中,我有一个带有3个子表的父div。我希望这些表彼此相邻,并且父div在x轴上有一个溢出,以便用户可以在父div上滚动以查看下一个表。 HTML: JSFIDLE上的代码: 一种方法是添加另一个div。顶级容器设置宽度和溢出,就像您使用\q#u box一样。下一个div(新div)有一个额外的宽度,以容纳向左浮动的表格: #wrap { width: 1000em; } 更新的fiddle:解决方案是不使用浮动左css,而是使用显示内联块。然后,您可以将空白nowrap应用于父di

在IE8中,我有一个带有3个子表的父div。我希望这些表彼此相邻,并且父div在x轴上有一个溢出,以便用户可以在父div上滚动以查看下一个表。 HTML:

JSFIDLE上的代码:

一种方法是添加另一个div。顶级容器设置宽度和溢出,就像您使用
\q#u box
一样。下一个div(新div)有一个额外的宽度,以容纳向左浮动的表格:

#wrap {
  width: 1000em;
}

更新的fiddle:

解决方案是不使用浮动左css,而是使用显示内联块。然后,您可以将空白nowrap应用于父div

#q_box{
    position:relative;
    height:120px;width:100px;
    background:red;
    float:right;
    overflow-x:auto;
    white-space: nowrap;
}
#q_box table{
    display: inline-block;
    border:1px solid #000000;
}
我已经告诉你了

请注意,这个内联块在IE7中不起作用。您可以使用display:inline并为元素指定hasLayout,例如,zoom:1

#wrap {
  width: 1000em;
}
#q_box{
    position:relative;
    height:120px;width:100px;
    background:red;
    float:right;
    overflow-x:auto;
    white-space: nowrap;
}
#q_box table{
    display: inline-block;
    border:1px solid #000000;
}