Welcome to WebmasterWorld Guest from 54.224.113.125

Forum Moderators: not2easy

Message Too Old, No Replies

css hover

     
9:00 pm on Sep 7, 2011 (gmt 0)

New User

joined:Sept 7, 2011
posts: 2
votes: 0


Hey

Allright so i've been at this for quite sometime now about a few days here and there. I know that there already is a posting similar to this one however it didn't work. What i'm trying to do is have it when you hover over an image, the image moves to the left bottom position.

Here is the code I tried:

a{
width:94px;
height:94px;
float:left;
}
a:hover{
background-position:bottom;
}



The problem is that background-position gets ignored.

The other issue is that I can't add a background:url in the a class because i'm using a cms, so the image is automatically placed.

I would really love some help on this asap. It's been driving me insane that I can't figure it out.

Thanks
Riz
9:55 pm on Sept 7, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2006
posts: 3123
votes: 0


The other issue is that I can't add a background:url in the a class because i'm using a cms, so the image is automatically placed.


How are you adding a background-image to the anchor? Automatically placed? The anchor needs to have a background-image in order for background-position to have any effect.
10:28 pm on Sept 7, 2011 (gmt 0)

New User

joined:Sept 7, 2011
posts: 2
votes: 0


it's done through a cms actually, so the css call say in firebug is just element.style
11:00 pm on Sept 7, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2006
posts: 3123
votes: 0


In that case it's added inline. Try...
background-position: -50px 50px;


Does that do anything?