duanbin3021
2014-07-13 18:17
浏览 81
已采纳

CSS Div内联块内容叠加

please help me fix the css div content overlay problem at http://tinyurl.com/n2stvj6 the Related blog post Div., is overlapping post_content Div.

i need the same layout in above url without content overlapping.

<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;
}
  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dongmi5177 2014-07-13 18:20
    已采纳

    You can just use floats:

    .post_content {
        overflow:hidden
    }
    .related-category-posts {
        float:right;
        background: #ccc;
        padding: 10px;
        width:230px;
    }
    
    已采纳该答案
    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题