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

  • Home
  • SEARCH
  • 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 7128041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T11:05:48+00:00 2026-05-28T11:05:48+00:00

I am creating a simple Jigsaw puzzle. In order to do this, I need

  • 0

I am creating a simple Jigsaw puzzle. In order to do this, I need to cut the picture I am using into 20 pieces. Is there a way in Javascript to cut a picture into 20 equal pieces and save them as 20 different objects within the webpage? Or do I just have to go into photoshop and cut each picture out myself and call it in?

  • 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-28T11:05:49+00:00Added an answer on May 28, 2026 at 11:05 am

    You can do this by setting the image as a background on a div, then setting its background-position. This is basically the same as using CSS Sprites.

    (assume pieces are 100 x 100px)

    <div class="puzzle piece1"></div>
    <div class="puzzle piece2"></div>
    

    CSS:

    .puzzle {
       background-image:url(/images/puzzle.jpg);
       width:100px;
       height:100px;
    }
    
    .piece1 {
       background-position:0 0
    }
    
    .piece2 {
       background-position:-100px -100px
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a simple application using the MVC design pattern where my model
I am fairly familiar with creating simple custom controls, but I haven't had this
I am creating simple console application where I need to load RTF file to
I'm looking for help/advice with creating simple JSP website using equivalent of PHP include+switch
I have seen several methods for creating simple fixed width single column layout using
Im creating a simple Rails 2.3.8 gem and need a migration file inside it.
I'm creating a simple code generator with delegates. Why am I getting this error
I was creating a simple command line utility and using a dictionary as a
Creating simple app using GAE / Django-nonrel (I don't think the problem is specific
I'm creating a simple game using HTML and CSS. I have a background image

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.