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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:11:05+00:00 2026-05-12T07:11:05+00:00

I am using the sliding doors technique to style buttons on a site I’m

  • 0

I am using the sliding doors technique to style buttons on a site I’m making and it seems to be working within Chrome but the background is not displaying for any other browser. My code for the button is below:

<div class="small-white"><a href="#">Done Reading</a></div>

CSS:

.small-white { 
    float:left; 
    background:url(images/small-white-sprite.png) right no-repeat; 
    margin: 15px 5px 0 5px; 
    padding:0; 
    display:block;
            height:22px;
}
.small-white a {
    display:block;
    background:url(images/small-white-left.png) no-repeat left;
    padding:4px 10px 7px 9px;
    color:#333;
    text-decoration:none;
    float:left;
}

Please advise.

Thanks in advance.
-B

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

    Since you’re using two images anyways (Sliding Doors usually only involves one image; in fact, that’s the point), you can just do this instead to keep transparency:

    .small-white { 
        background: url(images/small-white-left.png) no-repeat 0 0;
        float: left;
        margin: 15px 5px 0 5px;
        padding: 0 0 0 9px; /* NOTE: 9px should be replaced with the width of above
                                     image. */
    }
    .small-white a {
        background: url(images/small-white-sprite.png) no-repeat 100% 0;
        color: #333;
        display: block;
        height: 22px;
        line-height: 22px;
        padding: 0 10px 0 0;
        text-decoration: none;
    }
    

    The <a> element shouldn’t have float: left; (since it has nothing to float around inside the <li> element.) The line-height is for centering the text vertically.

    Using just one image isn’t possible with transparency, but if you know what the background color will be, you can flatten the image on that color, then you’ll be able to use just one image (use the same CSS as now, but add small-white-left.png to the left in small-white-sprite.png, then use that for both elements.)

    If you want to have the left-most part of the button clickable, put a <span> element around the text in the <a> element and use this CSS:

    .small-white { 
        float: left;
        margin: 15px 5px 0 5px;
        padding: 0;
    }
    .small-white a {
        background: url(images/small-white-left.png) no-repeat 0 0;
        color: #333;
        display: block;
        padding: 0 0 0 9px;
        text-decoration: none;
    }
    .small-white span {
        background: url(images/small-white-sprite.png) no-repeat 100% 0;
        display: block;
        height: 22px;
        line-height: 22px;
        padding: 0 10px 0 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to style a button with the css 'sliding doors' technique, but it
I am trying to do navigation menu, using sliding doors technique. my site is
We use the sliding doors technique in CSS with sliced background images as mentioned
I am using jquery Tiny Carousel for sliding images but our client asks for
I'm making a jQuery slider using sliced images to look like one looong sliding
I have a big form so for that am using sliding form http://tympanus.net/Tutorials/FancySlidingForm/ but
I am using code off this site: http://buildinternet.com/2009/03/sliding-boxes-and-captions-with-jquery/ My problem is I mouse over
I am making a multi-page form using http://tympanus.net/codrops/2010/06/07/fancy-sliding-form-with-jquery/ . I want to include a
Trying to find an example that has css rollover using sprites & sliding door
I am using this sliding top panel using mootools (for orientation, the code is

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.