Use w3-cell-row on a parent container and w3-cell on its children to arrange content side by side.
The row fills the available width. The cell widths adjust to the content and available space.
Both colored cells have the same height because the first contains more text.
First cell.
This cell contains more text.
Its content makes the row taller.
Second cell.