Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/36.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 将重叠div放置在右下角_Html_Css - Fatal编程技术网

Html 将重叠div放置在右下角

Html 将重叠div放置在右下角,html,css,Html,Css,我正在构建一个图像调节应用程序 每个图像显示为一个平铺,有一个按钮用于批准图像,还有一个按钮用于从数据库中删除图像 我一直在努力将删除按钮(带有“X”的按钮)放在每个磁贴的右下角 我想这和定位有关,但我已经尝试了很多选择,但还没有找到解决方案,这让我发疯 .remove { position: absolute; right:0; bottom:0; z-index : 0; background-color: rgba(255,255,255,0.8); width:40px; height:

我正在构建一个图像调节应用程序

每个图像显示为一个平铺,有一个按钮用于批准图像,还有一个按钮用于从数据库中删除图像

我一直在努力将删除按钮(带有“X”的按钮)放在每个磁贴的右下角

我想这和定位有关,但我已经尝试了很多选择,但还没有找到解决方案,这让我发疯

.remove {
position: absolute;
right:0;
bottom:0;
z-index : 0;
background-color: rgba(255,255,255,0.8);
width:40px;
height:40px;
padding-top:2px;
padding-left:5px;
font-size: 2em;}
看小提琴:

有什么线索吗


编辑:谢谢,我缺少位置:相对。

更新Css,如下所示:

只需将
position:relative
添加到父级
。entry
div,这样绝对定位元素就可以相对于父级

.entry {
    display:inline;
    overflow:hidden;
    float:left;
    width:31%;
    margin: 1.1%;
    position:relative; /* add this */
}