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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:20:51+00:00 2026-05-11T19:20:51+00:00

Ok…so here is the problem. I have a CSS sprite image made up of

  • 0

Ok…so here is the problem.

I have a CSS sprite image made up of ten(10) 25px x 25px icons laid out horizontally – thus resulting in a sprite image of 250px width.

I am using these 25×25 images as thumbnails. I’m looking to have an opacity of 30% on these images in INITIAL view and when a user hovers over them the opacity needs to be 100% (1).

So what I did was create a SECOND row of images with their opacity at 30% – so now I have a sprite image of 250px x 50px. The top 25px at 100% and the bottom 25px at 30%.

I setup HTML as follows:

<a href="largeimage1.jpg" class="thumb1"></a>
<a href="largeimage2.jpg" class="thumb1"></a>
<a href="largeimage2.jpg" class="thumb1"></a>
etc...

and the CSS:

a { display: block; float: left; width: 25px; height: 25px; background: url("250_x_50_spriteimage.jpg") 0 -25px no-repeat; }
.thumb1 { background-position: 0 0; }
.thumb2 { background-position: -25px 0; }
.thumb3 { background-position: -50px 0; }
a:hover { **background-position-y**: -25px; }

However, this doesn’t appear to work unfortunately, as background-position-y is NOT supported in Firefox (or is not a standard, but is IE-specific).

The idea is that we (only) want to SHIFT the sprite image UP (along y-axis) and leave the x-axis as is (or was set in the previous classes).

If there is no simple CSS solution to this – can this opacity effect be done with JQUERY? So the thumbs would load at 30% opacity and would transition to 100% opacity when user hovers?

Many thanks,

M.

  • 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-11T19:20:51+00:00Added an answer on May 11, 2026 at 7:20 pm

    You do not need a second icon set nor the use of JavaScript to achieve the desired effect.

    As Lou pointed out, use opacity to make your icons 30% or fully visible. No need to mess with background-position anymore.

    Just go ahead and define your styles accordingly to the following:

    a {
        opacity:0.3;  /* for standard browsers */
        filter: alpha(opacity = 30);  /* for IE */
    
        display: block;
        float: left;
        width: 25px;
        height: 25px;
        background: url("250_x_50_spriteimage.jpg") 0 -25px no-repeat;
    }
    
    a:hover {
        opacity:1.0
        filter: alpha(opacity = 100);
    }
    
    .thumb1 { background-position: 0 0; }
    .thumb2 { background-position: -25px 0; }
    .thumb3 { background-position: -50px 0; }
    

    If you are worried about validation of your CSS code, take the IE-specific parts (which won’t validate) and put them in specifically targeted CSS files via conditional comments.

    Hope that helps.

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

Sidebar

Ask A Question

Stats

  • Questions 103k
  • Answers 103k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Using a PID in this manner is problematic. I've seen… May 11, 2026 at 8:27 pm
  • Editorial Team
    Editorial Team added an answer Try cvs update 2>&1 | ... IIRC, the log output… May 11, 2026 at 8:27 pm
  • Editorial Team
    Editorial Team added an answer You can use GCC's constructor attribute to ensure that it… May 11, 2026 at 8:27 pm

Related Questions

OK. This is a bit of a vanity app, but I had a situation
OK, I know what you're thinking, "why write a method you do not want
Ok, I asked a question earlier about Flex and ADO.NET Data Services but didn't
OK. This problem is doing my head in. And I don't know if there
OK, this kind of follows on from my previous question . What I would

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.