let divHeight = document.getElementById('divID').offsetHeight; divHeight -= 264; document.getElementById('divID').style.height = `${divHeight}px`;