This is not possible directly. ScrollHeight is a read-only property that contains the total height of the content of the element in pixels.
If you have element A and want to have element B with the same scrollHeight as element A, make element B have one child div (move all the contents of the previous element B as children of the div) that is set to :
width : 100%; overflow : hidden;
and using javascript, set the DIV height to scroll the Height of the A element (in pixels):
document.getElementById('B').childNodes.item(0).style.height = document.getElementById('A').scrollHeight + 'px';
source share