简体   繁体   English

Flex-basis Auto无法正常工作

[英]Flex-basis Auto not working

I have 2 articles in a main that have flex: 1 auto; 我有2 articlesmainflex: 1 auto; set on them, and they sit fine until I add content into them and suddenly they're both different sizes! 放在它们上,它们坐好,直到我在其中添加内容,然后它们的大小突然不同!

Nothing in them is wider than the boxes when they're at the same width, and only 2 form inputs on the left have a set width. 当它们具有相同的宽度时,它们中没有什么比框更宽,并且仅左侧的2个表单输入具有设定的宽度。

I can't post any code here because it's so deep and I don't want to miss anything out that could be important, so the demo is at spendit.dpdesignz.co . 我不能在这里发布任何代码,因为它太深了,我不想错过任何可能很重要的东西,因此该演示在了punitit.dpdesignz.co上 The boxes I'm having issues with are the login form and "Supported Banks" articles in the middle of the page. 我遇到的问题是登录表单和页面中间的“支持的银行” articles

I've tried setting the flex-shrink and flex-grow to 0 with no luck. 我尝试将flex-shrinkflex-grow为0,但是没有运气。

This is my first time using flex, and I've worked on dozens of "fixes" over the past 5 hours with no luck, so any help/suggestions would be much appreciated :) 这是我第一次使用flex,在过去的5个小时中,我已经完成了数十次“修复”工作,但是没有运气,因此,任何帮助/建议都将不胜感激:)

I think what you are looking for is flex: 0 1 50%; 我认为您正在寻找的是flex: 0 1 50%; (don't grow - you may want to set shrink to 0, I don't know I expect so, 50% (equal). (不要增长-您可能希望将收缩率设置为0,我不知道我希望达到50%(相等)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM