html css div height to fit content code example Example: css div width fit content display: inline-block;