negative positioning of elements background position

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

negative positioning of elements background position

Post by s.dot »

So, as is the usual, this works in firefox and not IE.

I have this CSS on hover of the tabs:

Code: Select all

#topnav a:hover {
      background-position:0 -42px;
}
Here is the display of the tabs:
Image

And this is the background image I'm loading:

Image

So when it loads, it loads the whole image. And on hover, the -42 px creates a nice seamless "rollover" effect.

As you can see, this causes the line on the right not to be extended to the top. When I switch the images out for background colors with borders, it works fine.

Is there something I'm missing?
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Post by matthijs »

Can I see the rest of the code or an URL? Maybe it's some background color on top of the the background image (border) but without any code I can't tell.
Post Reply