1

Why does flex ignore the width set on some items, but obey the widths set on others?

I want to use flex for a grid system where sometimes I want items that are 100% in width.

Codepen

In this linked example I want the items to obey the widths they are give. .full should be 100% width across the screen while .one-third and .two-thirds should obey their respective widths of 33.3% and 66.6%

But instead, everything squeezes onto one line.

.grid.full {
  width: 100%;
}

.grid.one-third {
  width: 33.33%;
}

.grid.two-thirds {
  width: 66.66%;
}
Michael Benjamin
  • 346,931
  • 104
  • 581
  • 701
user1486133
  • 1,309
  • 3
  • 19
  • 37

0 Answers0