fit container with content height code example Example: css div width fit content display: inline-block;