wrap boxes in section
A have a <section>
and <article>
s. I would like to move all <article>
elements and resize to width 100%, when user resizes browser. I try to do it with flex-box
. Here is what i want to achieve img http://up.programosy.pl/foto/boxes.jpg
JSFiddle here
section, article {
display: box;
}
article {
background: red;
margin: 10px;
display:-moz-box; /* Firefox */
display:-webkit-box; /* Safari and Chrome */
display:-ms-flexbox; /* Internet Explorer 10 */
display:box;
max-width: 300px;
min-width: 50px;
padding: 20px;
width: 100%;
overflow: hidden;
}
section {
display: -moz-box-flex;
background: blue;
}
Remove the max-width
you have set on them.
Updated jsFiddle - I removed the left/right margins
.
上一篇: CSS元素不会在IE 8中并排堆叠
下一篇: 在部分中包装盒子