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 8493575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:03:14+00:00 2026-06-10T23:03:14+00:00

I am creating a little diff -/ offset display and I would like to

  • 0

I am creating a little “diff -/ offset” display and I would like to draw somekind of a “line” to certain places within the text, to visualize where a “diff” occured. Basically I want to get from this:

enter image description here

to this or something similar:

enter image description here

I know about the canvas element and I can draw lines with that, but how could I place such an image in the correct place?

Is there maybe a “easy” CSS solution for an approach like this one ?

Are there any best practices I can follow? For instance, any ToolTip plugin/script must use something similar to point to a certain place.

I’m thankful for any helping hint on this. The original link to my jsfiddle:
http://jsfiddle.net/bKng6/

  • 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-06-10T23:03:16+00:00Added an answer on June 10, 2026 at 11:03 pm

    I’m not sure what is the expected behavior your application should do ( talking about the interaction with your end user ). you didn’t mentioned how cross-browser the solution would be. Any way, I don’t think pure CSS (also CSS3) would solve it without some JavaScript snippets. So, I would like to complement tucuxi and FelipeAls’s sugestions.

    Basically, about the line, some things to keep in mind during its development:

    • theres a lot of solutions to draw the line. As mentioned Canvas its can be a choice, but I’m sure it isn’t the simplier one.

    • the working example suggested by tucuxi was done through CSS annitations, what is a good choice, simplier than canvas, and can be improved to accomplish the same design proposed by FelipeAls’s.

    • If your expected visual interaction with the end user is near to FelipeAls’s suggestion a div with a 2px border width by default, plus both right and botton border width set to 0 will solve your line doubt. I’ve made working sample right here. On the proposed sample I’ve use DOM relative position to measure the correct line position. Although I did it using jQuery, you always will be able to do this in pure JS or another DOM based library as Mootools.

    I really hope it helps you.

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

Sidebar

Related Questions

I'm creating a little dynamic tooltip function. Basically if I have a link like
I am creating a little Math library for myself contained within a single project
I'm creating a little algo to fetch text from web sites.. then find answers
I'm creating a little photo sharing site for our home's intranet, and I have
I am creating a little script that allows me to slide my content sections
I've been wondering how to do this for ages. I'm creating a little app,
I need a little help creating a catch-all error handling page in my ICEfaces
I'm having little trouble creating a script working with URLs. I'm using urllib.urlopen() to
Seems I've outdone myself. All the while I was creating this pretty little 'latest
Could someone give me a little direction on creating crossfades/dissolves between two UIImageViews in

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.