CSS: How to float 3 divs side by side for width:100% without messing up? -
i want put 3 div { width:33%; border: 3px solid #333;}
aside within page. fails, if sum superior 100%.
how float 3 divs side side , occupying width:100% without messing ?
the borders not counted within div's box. add, , messing set, width : 3boxes * (33%+3px+3px), more 100%.
use :
.left { float:left; width:33.3%; border: 3px solid #333; } .box-sizing { box-sizing: border-box; }
see fiddle demo, can resize result box stays perfect. :)
Comments
Post a Comment