Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Problems setting div height to 100% of parent value Reply To: Problems setting div height to 100% of parent value

#245794
Alex Zaworski
Participant

You can accomplish this with flexbox, depending on your browser support requirements.

Here’s the gist of how it’d look:

.parent {
  display: flex;
}

.small-col  {
  flex-basis: 33%
}

.big-col {
  flex-basis: 66%
}

Note that you won’t need float, width, or height declarations anymore.

display:table is another option but it’s a lot more verbose.