how to make a div to wrap two float divs inside?

后端 未结 11 2187
野趣味
野趣味 2020-12-07 15:40

I don\'t know if it\'s a common problem, but I can\'t find the solution in web so far. I would like to have two divs wrapped inside another div, however these two divs insid

11条回答
  •  庸人自扰
    2020-12-07 16:17

    
    
        
    
    
    
    onetwo

    The secret is the inline-block. If you use borders or margins, you may need to reduce the width of the div that use them.

    NOTE: This doesn't work properly in IE6/7 if you use "DIV" instead of "SPAN". (see http://www.quirksmode.org/css/display.html)

提交回复
热议问题