Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/13.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 使用Internet Explorer在表格单元格中定位绝对值_Html_Css_Internet Explorer_Css Position - Fatal编程技术网

Html 使用Internet Explorer在表格单元格中定位绝对值

Html 使用Internet Explorer在表格单元格中定位绝对值,html,css,internet-explorer,css-position,Html,Css,Internet Explorer,Css Position,我有一个表结构,我需要嵌套元素来获取表单元格div的所有大小。因此,我将其设置为绝对值,并将其所有位置定义为0,它在FireFox和Chrome上非常有效,但在IE上不起作用:( 以下是标记: <div class="table"> <div class="cell"> <figure class="illustration">My illustration</figure> </div> </div&

我有一个表结构,我需要嵌套元素来获取表单元格div的所有大小。因此,我将其设置为绝对值,并将其所有位置定义为0,它在FireFox和Chrome上非常有效,但在IE上不起作用:(

以下是标记:

<div class="table">
    <div class="cell">
      <figure class="illustration">My illustration</figure>
    </div>
</div>
这是我的钢笔:

如果您看到红色背景,则可以;)


对IE有什么意见吗?

这不是位置问题,你的身材只有零高度。我只是简单地将
height:300px
插入
插图
类,现在它在IE上运行良好:

.illustration {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: red;
    color: #fff;
    height: 300px;
}

在真正的代码中,您肯定会在
figure
标记中有一些图像,因此应该没有问题。

我也有同样的问题。 如果有人仍在寻找解决方法,您需要在.cell中创建一个容器

.cell > div{
    height:100%;
    width:100%;
    position:relative;
}
.cell > div{
    height:100%;
    width:100%;
    position:relative;
}