Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Replace image

edited October 7 in Style Development Firefox
Help how to change picture ?

img[src="/imglocation.png"] {
background: url(something.png) no-repeat;
}

I tried this method but nothing changed.
https://i.imgur.com/bQygQK8.png
1280 x 554 - 142K

Comments

  • q1kq1k
    edited October 7 Chrome

    Unless the image is transparent, you will have to use padding to see the background and then remove height and width.

    img {
      background-image: url();
      padding-top: 10px; /*size of height*/
      padding-left: 10px; /*size of width*/
      height: 0; width: 0; /*this will make the image disappear*/
    }
    
  • edited October 8 Firefox
    Thank you @q1k

    img[src="nocache-617/img/hockey/wlevel_1.gif"] {
    background: url(https://i.imgur.com/U40n31g.png) no-repeat!important;
    height: 0!important;
    width: 0!important;
    padding-left: 14px!important;
    padding-top: 14px!important;
    }
Sign In or Register to comment.