What is the issue with this simple HTML, CSS layout?

This question already has an answer here:

  • How do you keep parents of floated elements from collapsing? [duplicate] 16 answers

  • Add this style in your CSS file:

    .container:before,
    .container:after {
        display: table;
        content: " ";
    }
    
    .container:after {
        clear: both;
    }
    

    This should solve the Issue!

    链接地址: http://www.djcxy.com/p/88442.html

    上一篇: 如果块元素包含另一个块元素,将块元素更改为内联CSS是错误的吗?

    下一篇: 这个简单的HTML,CSS布局有什么问题?