Is there a way to measure height of a div element using javascript?
Here is my situation: I created a top fixed position bar on my website, so even if I scroll the page up/down, the bar stays on top, but my problem is bar overlaying the webpage, what I want is bar pushing the webpage down for the height of the bar so they look like stacked, I managed to do it by fixed height, say 50ox, I set html page top margin and they looked ok, when the height of bar changes, for example looking the same page in mobiles goes wrong because height of bar increases in mobile but the top margin I set is still 50, so I need a way to measure actual height of bar when ti is rendered and adjust the page according to it.