html - 需要 CSS float 帮助

标签 html css css-float

伙计们请帮我解决这个 float 问题。我尝试了不同的方法,但对我来说没有任何效果。 enter image description here

在html文件中,小图片在全局容器中。页脚放在全局容器的正下方。但是现在页脚到了顶部。

这些是我的CSS-

图像的 CSS-

style="margin-top: 25px; margin-right: 48px; float: right;"<br>
style="margin-top: 25px; margin-right: 48px; float: left;"

#footer_container{
    width: 900px;
    height: 10px;
    margin-top: 10px;
    padding-bottom: 10px;
    position: absolute;
    border: solid;    
}     



#global_body_container{
    width: 746px;
    position: absolute;
    padding-bottom: 10px;
    border-color: #c6c8cc;
    border-style:dashed;
    clear: both;


}

谢谢。

最佳答案

放置在 float 元素的容器上overflow: hidden

#global_body_container {
    overflow: hidden;
}

关于html - 需要 CSS float 帮助,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6380046/

相关文章:

javascript - jquery bxslider 不能在 ng View 中使用模板

html - 使用 CSS 定位一个按钮和一个 div

php - 如何根据重复区域中该行的 <td> 中的相应 $value 将 css 类应用于 <tr>

css - 如何使 float 图片库居中

html - 如何在文本旁边获取图像?

javascript - 由于正在加载modernizr,单击时表单未提交

html - 为什么这是明确的:both acting globally?

html - CSS float 属性意外行为

html - 连续居中两个 col-sm-6 + 一些基本的 boostrap 混淆

css - 使用 CSS 选择元素的最佳方式