php - CSS Div 内联 block 内容叠加

标签 php html css wordpress

请帮我解决 css div 内容覆盖问题 在 http://tinyurl.com/n2stvj6 相关博文 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;
}

最佳答案

你可以只使用 float :

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

关于php - CSS Div 内联 block 内容叠加,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24725784/

相关文章:

HTML - 字符集 Windows 1255 工作但 utf-8

javascript - 函数内部的简单 "if"语句不起作用

css - float div 时的额外行

php - 我的标题菜单存在 IE 布局问题,它在所有其他浏览器中运行良好

php - 用于动态创建元素的 JQuery 和 PHP

php - 从数据库接收变量的最佳方式

html - 在图像下方添加文字,然后在左侧添加单独的文字

php - Magento - customer_save_after 总是解雇两次

javascript - 通过在html中添加一个简单的侧边栏来自定义swagger-ui

javascript - Bootstrap 字形错误 : square instead of icon