这个css错误是什么?

Fat*_*ark 2 html css firefox

XUL box for div element contained an inline br child, forcing all its children to be wrapped in a block.
Run Code Online (Sandbox Code Playgroud)

它只是一个警报,但不是致命的错误,网页不会有任何问题,但这个问题发生在我的firebug控制台,这很烦人,如何防止这种情况?或者如何在firebug中忽略这些错误?

我怀疑它是由此引起的:

#top_icon01{
    position:relative;
    background-image : url('../hill_header/img/top_Icon_i01.png');
    background-repeat : no-repeat;
    background-size : 56px 56px;
    background-position: 50% 20px;
    width : 172px;
    height : 130px;
    padding-top : 25px;
    text-align: center;
    display:block;
    display:-webkit-box;
    display:-moz-box;
    -webkit-box-pack:center;
    -webkit-box-align:center;
    -moz-box-pack:center;
    -moz-box-align:center;
}
Run Code Online (Sandbox Code Playgroud)

我提供了一些更多的细节:我没有勾选显示chrome错误,看到这是非常烦人的. 在此输入图像描述 如果我删除顶部标题:

<div id='topHeader'>
    <section id='top_middle_panel'>
        <div id='top_ryan'>
        <span class='float'> 
            <div id='top_icon01' class='top_icons'> 
                <h1>Design</h1><br><h6>Create Value</h6>
            </div>
        </span>
        <span class='float'> 
            <div id='top_icon02' class='top_icons'> 
                <h1>Multimedia</h1><br><h6>Amazing Presentation</h6>
            </div>
        </span>
        <span class='float'> 
            <div id='top_icon03' class='top_icons'> 
                <h1>Marketing</h1><br><h6>Connect to The World</h6>
            </div>
        </span>
        </div>
    </section>
</div>  
Run Code Online (Sandbox Code Playgroud)

没有更多的错误.

bri*_*ris 6

编辑:改变我的答案

我在jsFiddle中复制了它!http://jsfiddle.net/brianpeiris/KEsZh/show/

由于您已将top_icon div设置为使用灵活的盒子模型(显示:-moz-box),Firefox会警告您已<br />直接放入内部,然后强制它将这些div的内容包装在另一个块中,所以它抱怨(可能是不必要的).

因此,要阻止Firefox抱怨,您可以明确地将top_icon div的内容包装在另一个div中.这让Firefox很开心.

<div id='topHeader'>
    <section id='top_middle_panel'>
        <div id='top_ryan'>
        <span class='float'> <div id='top_icon01' class='top_icons'><div><h1>Design</h1><br><h6>Create Value</h6></div></div></span>
        <span class='float'> <div id='top_icon02' class='top_icons'><div><h1>Multimedia</h1><br><h6>Amazing Presentation</h6></div></div></span>
        <span class='float'> <div id='top_icon03' class='top_icons'><div><h1>Marketing</h1><br><h6>Connect to The World</h6></div></div></span>
        </div>
    </section>
</div>  
Run Code Online (Sandbox Code Playgroud)

或者,您可以删除<br />并找到另一种解决方案来格式化您的内容.