0

How are flex widths calculated? If I had 3 columns, how would I compensate for removing one of them, i.e. replacing 2 flex columns with 1 and keeping the exact same width. Is it at all possible?

Example: https://jsfiddle.net/xssyv8y1/

section {
  display: flex;
  height: 200px;

  div {
    &:first-child {
      flex: 1 0 100px;
    }
    &:nth-child(2) {
      flex: 10 0 400px;
    }
    &:last-child {
      flex: 1 0 150px;
      display: none;
    }
  }
}
  • any column has a fixed width? –  Jun 16 '16 at 11:01
  • There is no such thing as a `flex-width`...only `flex-grow/shrink/basis` and **none** of these equate to `width`. If you want to use a fixed width that's what you should use. As it stands since the two do not equate, there is no CSS that can help you. – Paulie_D Jun 16 '16 at 11:30
  • Related - http://stackoverflow.com/questions/34733955/width-vs-flex-grow-in-flexbox – Paulie_D Jun 16 '16 at 11:32

0 Answers0