tags:

views:

762

answers:

1

okay backstory.

I'm writing code in Stylish, a firefox plugin, to change the image that is shown up.

the image property doesn't have a div tag, so i have to use this:

img[src*="s_dschjungelplanet"]{
##########
}

So this will replace "s_dschjungelplanet" anywhere in the page, in a img src.

so my main problem is that im not sure HOW to tell it to replace the src="xxx".

Ta for replies

+4  A: 

There is no easy way. I think you'd be better of with greasemonkey scripts, as with a simple such script you can change the url.

As far as I know, you can not change the url with css only. This was the closest I was able to come with css only:

img[src*="s_dschjungelplanet"]{
    width:0;
    height:70px;
    padding-right:250px;
    background:transparent url(http://i.stackoverflow.com/Content/Img/stackoverflow-logo-250.png) top left no-repeat;
}
Mikko Tapionlinna