浮动div在Firefox中无法正常工作

浮动div在Firefox中无法正常工作,firefox,html,layout,liquid,Firefox,Html,Layout,Liquid,我的网页可以在Chrome和IE上正常工作,但不能在Firefox上正常工作。我使用的是带有缩放按钮和浮动div的液体布局。目前,内容滑块应该在页面的中间(像是Chrome和IE),但是在Firefox上它跳过了其他按钮的顶部。我的代码怎么了 index.html: <html> <head> <link rel="stylesheet" type="text/css" href="style.css"> <title>Cnop</title

我的网页可以在Chrome和IE上正常工作,但不能在Firefox上正常工作。我使用的是带有缩放按钮和浮动div的液体布局。目前,内容滑块应该在页面的中间(像是Chrome和IE),但是在Firefox上它跳过了其他按钮的顶部。我的代码怎么了

index.html:

<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<title>Cnop</title>

</head>

<body>

<div id="col1"><a href="http://cnopicilin.deviantart.com/" target="new"><img src="Images/da.png" class="opacity_img"></a></div>
<div id="col2"><a href="https://www.youtube.com/user/CnopHD" target="new"><img src="Images/Games.png" class="opacity_img"></a></div>
<div id="col2"><a href="https://www.youtube.com/user/JARMOPOWER" target="new"><img src="Images/blue.png" class="opacity_img"></a></div>
<div id="col2"><a href="https://www.youtube.com/channel/UC9w6xXZm7YYQMHEZNwJEt6w" target="_blank"><img src="Images/main.png" class="opacity_img"></a></div>
<div id="col2"><a href="https://www.facebook.com/CnopMedia" target="new"><img src="Images/fb.png" class="opacity_img"></a></div>
<div id="col3"><a href="https://www.facebook.com/CnopMedia" target="new"><img src="Images/cnop.png" class="channel"></a></div>

<div class="erotin"></div>

<div class="container">
    <a href="#">
        <img class="thumb" src="Images/scroll/thumb1.png">
        <img class="big" src="Images/scroll/big1.png">
    </a>

    <a href="#">
        <img class="thumb" src="Images/scroll/thumb2.png">
        <img class="big" src="Images/scroll/big2.png">
    </a>

    <a href="#">
        <img class="thumb" src="Images/scroll/thumb3.png">
        <img class="big" src="Images/scroll/big3.png">
    </a>

    <a href="#">
        <img class="thumb" src="Images/scroll/thumb4.png">
        <img class="big" src="Images/scroll/big4.png">
    </a>

    <a href="#">
        <img class="big featured" src="Images/scroll/featured.png">
    </a>

    <a href="#">
        <img class="big featured2" src="Images/scroll/featured2.png">
    </a>
</div>

</body> 

</html>

原因是,.container没有清除上面元素的浮动


添加
清除:两者都有到css中的.container-block,然后它在ff中工作;)

您有多个带有
id=“col2”
的元素,这是您想要的吗?是的,col1是页面徽标,col2是所有其他链接,但最右边的链接有更多的边距使它们居中一点。查看www.sabulo.com/cnop了解最终产品。谢谢,一行简短的代码修复了它!我不知道清理浮标,但现在我知道了。