I am trying to get the size of an element inside of a viewport. For this I have used
getClientBoundingRect() because it will give me the size after transforms have been applied. The issue I have ran into is that the client rect will not size bigger than the highest viewport. So I switched to
getBBox(). Now the problem is that it does not work in Firefox. What is the best way to get the size of an element across all the browsers?
Demo on jsBin
You could try to wrap a div around it: