calculate height px from width % css code example Example: css calc height div { width: calc(100% - 100px); }