Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

How to change SRC of IMG tag in discussion list?

$
0
0

I am trying to replace the SRC from /_layouts/15/images/spcommon.png to _layouts/15/images/attach16.png. I have added discussion item to Discussions list in which I have uploaded a file. Discussion list shows in the main mage a Camera picture (/_layouts/15/images/spcommon.png?rev=23)

The actual CSS for discussion list is following

<img title="This post contains an image." class="ms-comm-postImageIcon" alt="This post contains an image."src="/_layouts/15/images/spcommon.png?rev=23">

I tried replacing the src with the following code using my custom css. I also followed all the techniques mentioned athttps://css-tricks.com/css-image-replacement/

img.ms-comm-postImageIcon{
  width: 16px;
  height: 16px;
  background: url("/_layouts/15/images/attach16.png");
  text-indent: -9999px;
}

The camera picture (spcommon.png) disappeared but the attach16.png is not showing. Any help?


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>