Replace image

edited October 2017 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.
1280 x 554 - 142K


  • q1kq1k
    edited October 2017 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 2017 Firefox
    Thank you @q1k

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