I'm using scrollHeight property to find the height of a div element. It is calculating the height value a little bit additional resulting in extra blank space.
I'm using this to toggle between expand contents and contract them such that
if(element.height == element.scrollHeight)
element contracts on button click
element expands on button click
The contents of the div are a paragraph and table with four to five rows. The toggle option is working fine. But the scrollheight is calculating excessive height resulting in irregular additional spaces to each div for which i had used this concept.
Please suggest me some alternative or a solution to this issue.
Thanks in advance
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)