Accepted answer

You could use method to set #wordcloud height within inline style. For example:

var height ='#scatterplot').node().getBoundingClientRect().height;'#wordcloud').style('height', height + 'px');
div {
  width: 50%;
  float: left;

#scatterplot {
  background: #f00;

#wordcloud {
  background: #0f0;
<script src=""></script>
<div id="scatterplot">
  <p>The text is used<br/>to change height<br/>of red div.</p>
<div id="wordcloud">
  <p>The heights of red and green divs are same.</p>

Related Query

More Query from same tag