开发者

Flexible box not working as expected

开发者 https://www.devze.com 2023-04-10 09:16 出处:网络
Ok, I am using Chrome for this. I have a div on which i defined display: -webkit-box;. Inside of this div there are 7 divs which all have -webkit-box-flex: 1;.

Ok, I am using Chrome for this.

I have a div on which i defined display: -webkit-box;. Inside of this div there are 7 divs which all have -webkit-box-flex: 1;.

The first div, however, is smaller than the othe开发者_开发技巧rs. Any thoughts anyone?


I don't think 7 boxes in an 80% width div will give you evenly spaced columns. Even playing with the border of the last column, or setting the parent to 960px. 7 just doesn't go into it evenly


Appearantly I misunderstood the box model. I was confused at the time and thought all divs would be equal, but actually it is the remaining space that is being added equally.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号