What does flex 1 mean

0 votes

The flex property is a shorthand for the flex-grow, flex-shrink, and flex-basis attributes, as we all know. The default value is 0 1 auto, which implies it has no effect.

flex-grow: 0;
flex-shrink: 1;
flex-basis: auto;

However, I've seen that flex: 1 is utilised in a lot of places. Is 1 1 auto or 1 0 auto abbreviated? I'm not sure what that signifies, and a Google search yields nothing.

Jun 17, 2022 in CSS by Edureka
• 13,620 points
15,905 views

1 answer to this question.

0 votes
If an element has flex: 1, it signifies that the width of all other elements will be the same as their content, but the element with flex: 1 will be given the remaining full space.
answered Jun 17, 2022 by Edureka
• 12,690 points

Related Questions In CSS

0 votes
0 answers

CSS reset - What exactly does it do?

This reset.css file was hidden inside a ...READ MORE

Jun 23, 2022 in CSS by Edureka
• 13,620 points
602 views
0 votes
0 answers

What does auto do in margin: 0 auto?

What does auto do in margin: 0 ...READ MORE

Jul 11, 2022 in CSS by Edureka
• 13,620 points
331 views
0 votes
0 answers

What Does 'zoom' do in CSS?

I saw that certain jQuery plugins utilize ...READ MORE

Jul 18, 2022 in CSS by Edureka
• 13,620 points
318 views
0 votes
1 answer

What does CSS measurement unit 'em' actually stand for?

It stands for "emphemeral unit," which refers ...READ MORE

answered Aug 3, 2022 in CSS by Tanishqa
• 1,170 points
735 views
0 votes
1 answer

Why vh works and % doesn't? (height css)

The height of an element, by default, ...READ MORE

answered Jun 10, 2022 in CSS by Edureka
• 12,690 points
1,775 views
0 votes
1 answer

Flex wrap and overflow on both column and row

Here's a workaround, but it comes with ...READ MORE

answered Jun 13, 2022 in CSS by Edureka
• 12,690 points
4,875 views
0 votes
1 answer

Controlling the amount of space in justify-content: space-between

The justify-content property positions flex items on ...READ MORE

answered Jun 28, 2022 in CSS by Edureka
• 12,690 points
4,421 views
0 votes
0 answers

Using Flex CSS and Bootstrap for a responsive layout

I've been playing with fully responsive layouts ...READ MORE

Jun 30, 2022 in CSS by Edureka
• 13,620 points
673 views
0 votes
1 answer

What does !important mean in CSS?

The CSS! important rule is used to ...READ MORE

answered Jun 1, 2022 in CSS by Edureka
• 12,690 points
743 views
0 votes
1 answer

What is the proper way to display a logo with CSS?

An <img> element is the proper way ...READ MORE

answered Jun 10, 2022 in CSS by Edureka
• 12,690 points
745 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP