dpDesignz dpDesignz - 1 year ago 114
CSS Question

Flex-basis Auto not working

I have 2

in a
that have
flex: 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.

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. The boxes I'm having issues with are the login form and "Supported Banks"
in the middle of the page.

I've tried setting the
to 0 with no luck.

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 :)

Answer Source

I think what you are looking for is flex: 0 1 50%; (don't grow - you may want to set shrink to 0, I don't know I expect so, 50% (equal).