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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:44:57+00:00 2026-05-25T20:44:57+00:00

This is something I’ve seen done by Grooveshark, which removes the need to use

  • 0

This is something I’ve seen done by Grooveshark, which removes the need to use multiple images for expandable buttons and such.

Basically, an image like this

enter image description here

is used to produce buttons of any width smaller than the image itself. I assume this is done by somehow trimming out the middle, but I’m not sure how. I’ve looked over the CSS properties for it’s usage here but can’t seem to find out what’s done aside from a 15px padding on either side.

Does anyone know how to replicate the same effect?

Edit: Just for clarity, I’m talking about cutting out the middle of a single button (I do realize I’ve given a picture of a sprite for 4 button styles, so it might be confusing when I say “cutting out the middle portion of an image”).

  • 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-25T20:44:58+00:00Added an answer on May 25, 2026 at 8:44 pm

    What you’re talking about is known as the sliding doors technique. By applying the background image to a container element to show the left edge, you can then apply the same image to another element that only shows the right edge.

    For example:

    .menu li {
      background: url(button-sprite.png) 0 0 no-repeat;
      padding-left: 10px;
    }
    
    .menu li a {
      background: url(button-sprite.png) 100% 0 no-repeat;
      display: block;
    }
    

    The list item shows the left edge of the image. The padding allows the left edge to show when another element is laid on top.

    The anchor element shows the right edge of the image, and it is cropped to the required width of the text content.

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

Sidebar

Related Questions

I need to break apart a string that always looks like this: something --
I've got a regular expression like this something (.*) someotherthing How do I use
I have something like this: something need here = scope.getConnections(); //getConnections() returns Collection<Set<IConnection>> I
Is this something common to all programming languages? Doing multiple print followed by a
Is this something that can be done more efficiently than with a vertex array?
I have a string (pulled from the web) which may look like this: \something\to\do.
Which tokenizer is appropriate to do this: input: This-something is something. output: [] [This]
I have a simple database table with 170MB overhead. Is this something I need
Is this something I shouldn't try?
Something like var life= { users : { guys : function(){ this.SOMETHING.mameAndDestroy(this.girls); }, girls

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.