<div className="stateList" style={{this.state.firstWidth,marginRight:this.state.right,marginBottom: '-5000px',paddingBottom:' 5000px'}} id='leftSides' >
var left = document.getElementById('leftSides'); if (left.offsetHeight >= val) { this.setState({ height:left.offsetHeight + 'px' }) } else { left.style.height = val + 'px'; } this.setState({ rightHeight:val })