css 间距问题- 帖子之间重叠?

标签 css position padding margin

我的意图是让 post_entry 与标题保持一致。我注意到有些条目会这样做,而另一些条目则看似随机地向上或向下移动。是什么原因造成的?我该如何修复/预防它?

网站- http://whskytngfxtrt.com

enter image description here (红线斜率表示问题所在)

谢谢。

最佳答案

我认为这与您通过点击#main .post_entry 和 p 放置在所有内容上的边距顶部有关,但除非您清理 HTML(如 Diodeus 和 Didier Ghys 所建议的那样:将所有内容放入单独的 div 中)它是不可能肯定地说。对不起!

在您的 CSS 中,我注意到这部分还有其他内容:

#main .post_entry p {
font-size: 80%;
font-weight: normal;
line-height: 150%;
margin-left: 230px;
margin-bottom: 25px;
margin-top: -82px;
overflow: hidden;
width: 403px;
margin-top: -82px;
}

如您所见,有两个 -82 的边距顶部。

关于css 间距问题- 帖子之间重叠?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9896445/

相关文章:

css - 在 Bootstrap 中完全居中表单

position - 移动 CKEditor 内联工具栏

jquery - 从另一个 Bootstrap 模式打开 Bootstrap 模式使 body 永久获得正确的填充

java - Blowfish CBC算法空间Padding如何实现

padding - 如何处理行高在div底部添加填充

css - Bootstrap/基础列问题

html - 如何循环播放 CSS3 转换?

javascript - 强制向左滚动时如何防止闪烁?

Android canvas drawText 文本的y位置

html - 如何将容器定位在 <p> 元素内,文本在其周围流动?