How to eliminate Flex

justify-content: space-around;
flex: 1.;

At some responsive width I have to eliminate flex:1, but How ?

In browser when I untick flex:1 → it works, but how to modify this is the css file. I put flex:0;, but that didn’t worked.

Hi there codeispoetry,

have you tried…

    flex: none;

ccothead

1 Like

Yes sir, I did, but that is creating a little bit of the complicacy. Please see this short video here.

Hi there codeispoetry,

the default value is…

    flex: 0 1 auto;

If you you want members to help resolve your coding problem(s),
then a link to the site in question would assist them to do that. :winky:

Failing that they would like to see the offending HTML and CSS code.

coothead

3 Likes

I completely understand sir, but due to some copyrights and privacy issues set by someone else, I was unable to post that.
But to keep you posted sir your solution worked now.

flex is a shorthand property that sets 3 properties, flex-grow, flex-shrink and flex-basis.
If you are only setting one of those properties there is no need to use the shorthand, set that property its self, such as flex-grow: 0

3 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.