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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:19:29+00:00 2026-05-29T08:19:29+00:00

I am learning to develop mobile applications, quite in the initial phase. This query

  • 0

I am learning to develop mobile applications, quite in the initial phase.

This query is not related to mobile but more to html/css/js.(for

I intend to make a simple game, where a picture is seen, a few options are available and the user can drag and drop these options onto the image.
eg. There is an image of a plant > options are #leaf #stem #flower #bud
The user must drag and drop the correct option to the correct place on the image to get points. i.e Drag the #leaf option onto the leaf of the plant.

Now my problem is the image, the separation of these points, I can’t figure out how to do it.

Query in short: How do I access separate points/sections on a single image in html/js for above purpose?

Query (longer version)
I did a little search and realised I can slice the image and recreate it using multiple images, I tried this, it sort of works but it has a a lot of drawbacks:

1)More images mean more space, combined size of the split images was about 1.5x the original image(this is just splitting it into 4 images)

2)For a complex picture, the number of images to slice into is large and hard to manage in css(n00b==me) as they don’t just need to be split into a simple X*Y grid but a much more complex split depending on the object in the image.(realised when I was trying to do a simple cell structure img)

3)More images also means more http requests(in case the app is WebView based) which will increase loading time.

It just seemed liked too much of a hassle, there must be a better way.

Then I saw css sprites , I dont need to combine my images like sprites are intended for, rather the reverse. Just access parts of my pre-existing image, as separate objects.I haven’t tried this(working on it) and and I haven’t seen this being done either, or maybe its being done and I’m not seeing.

Please help guys, my problem is quite simple(I think) , I think I’m just not getting the correct google search terms.

If anybody has any ideas,links, resources and also any clarifications as I may not have put up my problem as clearly as I’d like to, please do reply.

regards,
Rahul Agarwal

  • 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-29T08:19:29+00:00Added an answer on May 29, 2026 at 8:19 am

    You could try to place transparent divs over the main image using absolute position and fixed dimensions. Those divs will be assosiated to the possible options, and when a user drops an option over some specific div, you’ll know what points to give.

    Little demo using two divs and an animated scaling to show that the positioned divs will scale according to their parent:

    http://jsfiddle.net/VK3A8/

    fiddel with image:
    http://jsfiddle.net/8qLFc/4/

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

Sidebar

Related Questions

I'm learning to develop applications for Android but I need to know the XML
I've been learning to develop applications on the cocoa touch platform. I've come a
I am learning to develop iPhone applications using iOS 5. I am trying to
I am learning how to develop iPhone applications and I ran into an interesting
I've been learning to develop in Android and had more of a general question:
This one is killing me... I'm learning to develop SOAP servers in PHP at
I'm using NetBeans 6.9.1 with the latest PHP plugins, but I'm learning to develop
I want to develop Windows Azure apps for self learning. But it seems I
I am learning how to develop Windows Forms applications with Visual Basic Express 2008,
I am learning how to develop web applications using php. I am trying to

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.