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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:22:46+00:00 2026-06-15T19:22:46+00:00

I want to make css sprite with this image My html codes; <div class=top></div>

  • 0

I want to make css sprite with this image

http://oi49.tinypic.com/14nobhd.jpg

My html codes;

<div class="top"></div>
<div class="bottom"></div>
<div class="right"></div>
<div class="left"></div>

And css codes;

.left{
background : url(arrw.png) no-repeat 0 0;
width:12px;
height:19px;
}

.right{
background : url(arrw.png) no-repeat -29px 0;
width:12px;
height:19px;
}

.top{
background : url(arrw.png) no-repeat -12px 0;
width:16px;
height:12px;
}

.bottom{
background : url(arrw.png) no-repeat -12px -12px;
width:16px;
height:12px;
}

That work perfect but I don’t understand why give negative values for background position. Isn’t that coordinates system and Don’t we be necessary give positive values for this? Position values start 0 0 (left top) and must takes positive values isn’t it?What is wrong?

  • 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-15T19:22:47+00:00Added an answer on June 15, 2026 at 7:22 pm

    The sprite images you are using, are normally bigger than the box in which you display them. If just include an image it would get positioned to the top left. Now if you want to show the parts of the image that overflow to the right of the box, you’ll need to move the image to the left. But as the image is already at left: 0; by default, you need to set negative values to move it even further to the left.

    Think about two sheets of paper, one with a hole in it and the other getting moved around behind the first. To see a part of the rear sheet that is on it’s right bottom, you need to move to to the top left. So position directions are reversed to the direction you want to move the rear sheet when seeing it through a hole/displaying an image in a box.

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

Sidebar

Related Questions

I want make a page (HTML + CSS) that fits all the space left
I want to make an HTML, CSS page where the layout is as: <div
Want to make a vocabulary list in HTML & CSS that looks like this:
I want to make an html / css menu in my webpage that contain
Hy, i have a div with relative position (CSS) and i want to make
I'm not strong JS user, but I want make Nightingale chart like this: http://windhistory.com/station.html?KHKA
I want to make my HTML and CSS like above to display a white
I know the basics of html ans css, and now I want to make
I want to make a CSS only speech bubble. So far, I have this...
I want to make the easiest css for menus. There's an outer div and

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.