How to grab css values from html code inside a string?

How to grab css values from html code inside a string?

Hi, I am using Ajax and PHP to send back an array of divs generated.  The divs  css height value is auto.

So, what I wan to do is grab the height value and then adjust the top value. How can I do this?

ajax will return a jason to javascript.  I know I can access them like an array. However, I can't figure out how to grab the css values?  Also how can I get the height if the css  height value is auto? Is there a way to figure out the height?

I need to know the auto created height value the browser decided to use. So I can make the proper adjustments to the top value of the divs. So it will neatly be displayed in a row without any overlapping each other.


I am trying to access the computed style. Where if I used height to be set to auto the computed style will show instead of auto it will show  the value like 40px etc.