php - Programmatically find the distance between the rendered text of an html page -


example: <span style="padding-right:10px;">left text</span><span>right</span>

in above distance between "left text" , "right" 10px after have been rendered browser.

so application, take in html file , 2 variables(strings exist in html file) , find horizontal distance(in pixels?) between 2 strings.

possible @ all? guessing have modify open source engine webkit achieve this. right? or there simpler way? parse page css rules...would work?

if webkit, how hard ? languages need master ? know php (bit of c , c# , java)

thanks

use javascript.

that way can find properties of elements , compare them distance.

for example, can use javascript element.left, element.width, , element2.left. then, can find distance taking element2.left - (element.left+element.width).


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -