Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6080377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:03:15+00:00 2026-05-23T11:03:15+00:00

Example: <span style=padding-right:10px;>left text</span><span>right</span> In the above the distance between left text and right

  • 0

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

In the above the distance between “left text” and “right” would be 10px after they have been rendered by a browser.

So my application, would take in an html file and 2 variables(strings that exist in the html file) and then find the horizontal distance(in pixels?) between the 2 strings.

Possible at all?
I am guessing I will have to modify an open source engine like webkit to achieve this. right? Or is there a simpler way? Parse page for CSS rules…would that work?

If its webkit, then how hard would it be ? which languages would I need to master ? I only know php (bit of C , C# , java)

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:03:16+00:00Added an answer on May 23, 2026 at 11:03 am

    Use Javascript.

    That way you can find properties of elements and then compare them to get their distance.

    For example, you can use javascript to get element.left, element.width, and element2.left. Then, you can find the distance by taking element2.left – (element.left+element.width).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have code like this: <div class=ui-widget> <ul style=list-style-type: none; padding-left: 0; id=menuList> <li>
Example <span style=BACKGROUND-COLOR: #ffd700>Background color</span> How screen reader handle inline css ? is there
Can I have an identity (unique, non-repeating) column span multiple tables? For example, let's
How can I display HTML text in textview? For example, string &lt;h1&gt;Krupal testing &lt;span
I have something like the following code: <div style=border:2px black solid;overflow:hidden;> <span style=float:right;> <img
Alright here the question. This is an example text Nokia 700<span>Stok Kodu: 389952</span> <br><span
Example: You have a shortcut s to SomeProgram in the current directory. In cmd.exe
Example I have Person , SpecialPerson , and User . Person and SpecialPerson are
Looking through style sheets from popular & unpopular websites I have found the div
In the following example, I want the bottom of the site name text site

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.