Hello friend, welcome to my blog post how to set a height of div equal to another div jQuery. Suppose you have two div, div left and div right, now you need to set a height of left div according to your right side div height. How can you do this? You can do this by below method. At first, calculate the height of right side div using a jQuery function height. Then set this height into your left side div height.

In my example, I have two div, one with id div1 and another with id div2. I need to set id with div1 height according to id with div2. Below is my code.

Here I show a way to set the height of div equal to another div using jQuery. I hope the above tricks will save your valuable time. If you know another way to set the height of div equal to another div please share your thought. If you have any question or suggestion please comment below. If you like my post then please share it with your friends. Thank you.

Demo

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
How to set height of div equal to another div
Tagged on: