Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 我的包装器类是';";持有;任何东西_Css_Html - Fatal编程技术网

Css 我的包装器类是';";持有;任何东西

Css 我的包装器类是';";持有;任何东西,css,html,Css,Html,我有一个非常简单的代码。事情是这样的: <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Home Index Test</title> <link rel="

我有一个非常简单的代码。事情是这样的:

<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Home Index Test</title>
    <link rel="stylesheet" type="text/css" href="reset.css" media="all">
    <link rel="stylesheet" type="text/css" href="styles.css" media="all">

<!--    <script type="text/javascript" src="view.js"></script> -->
</head>
<body>

<div id="wrapper">
    wrapper
    <div id="header">
        <div id="logo">
               <img src="kimchi_img/bibi_logo.jpg">
        </div>

        <div id="login_menu">
            <p>About  Contact | Sign In  Register </p>
        </div>
    </div>
</div>

</body>
</html>

我还有一个
reset.css在后面发出咕噜声,但它没有清除。

每当你有一个包含浮动元素的容器时,除非你为该容器指定一个显式的
溢出,否则该容器将崩溃。将其添加到
#包装器
#标题

overflow: hidden;
现在,这(当然)将在IE6中失败。为了避免这个错误,我通常会在规则中添加以下内容:

-height: 1px;
-overflow: auto;

在这里,我使用
-
hack来针对IE6,但是如果您不喜欢使用hack,只需将这两个属性(不带连字符)移动到一个单独的样式表,并通过条件注释将其链接。

另一个解决方案是添加一个带有

style="clear:both;"

在包装的底部。

试着设置包装的高度。先生,你是个天才。真不敢相信我竟然忘了。啊。非常感谢@吉洛德:不客气。如果您希望用户使用仿古软件,请参阅我的兼容性更新:)很好。我正要提到同样的问题。你能解释一下它最初是如何在IE中失败的吗?@elliot:
溢出:隐藏不会导致IE6展开容器,结果是所有溢出的子项都被截断。至少在我看来,当我在浮动元素周围使用容器时,它是这样的。在某些情况下,这可能是一种解决方法,但在需要容器展开时,它不是这样的-例如,容器具有背景色或单击事件处理程序。我检查了容器
style="clear:both;"