繁体   English   中英

CSS Div内联块内容叠加

[英]CSS Div inline-block content overlay

请帮助我在http://tinyurl.com/n2stvj6上解决CSS div内容覆盖问题,相关博客文章Div。,与post_content Div重叠。

我需要上面的url中没有内容重叠的相同布局。

<div class="post_content">

      <div class="related-blog-posts">
      related content
     </div>

   <p> content goes here </p>

</div>

Css:
.post_content {
    position:relative;
}
.related-category-posts {
    position: absolute;
    top: 100px;
    right: 0;
    /* display: inline-block; */
    /* overflow: hidden; */
    background: #ccc;
    padding: 10px;
    width:230px;
}

您可以只使用浮点数:

.post_content {
    overflow:hidden
}
.related-category-posts {
    float:right;
    background: #ccc;
    padding: 10px;
    width:230px;
}

暂无
暂无

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

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