How do I stop these divs from overlapping?

前端 未结 6 1279
悲哀的现实
悲哀的现实 2020-12-16 20:31

I have three divs, within a content div.

Container width 70%. Within that I have -Left, width 20%. -Content, width 60%. -Right, width 20%.

I would like co

6条回答
  •  青春惊慌失措
    2020-12-16 21:30

    Instead of giving min-width of child DIV's you can give it to #container. Write like this:

    #container{
        width: 70%;
        min-width:1000px;
    }
    #left {
        float: left;
        width: 20%;
    }
    #content {
        float: left;
        width: 60%;
    }
    #right {
        float: right;
        width: 20%;
    }
    

    Check this http://jsfiddle.net/yLVsb/

提交回复
热议问题