I'm trying to modify an elements height (elementTwo) using another element's height (elementOne) using JS (No jQuery)
When I try logging elementOne.style.height, I get an empty string
Using Safari and Chrome inspector's I can see the computed height but cannot access it using JS. It shows up as faded (See screenshots)
Screenshot of Safari inspector |
Screenshot of Chrome inspector
I think you want to use the property
.clientHeight of the dom-element.
See the mdn arcticle about it.