Archive for the ‘CSS’ Category

Change img src without using content css property

February 23, 2015 Leave a comment


You may come across a situation where the content css property is of no use for example Mozilla Firefox does not understands content property and you have to consider it if you are looking towards cross-browser compatibility.

Below is a simple solution that would do the trick:

background: url('../images/common/Edit_new.png') no-repeat !important;

/** you can adjust paddings and width, height according to your need where image is displayed accurately **/
padding-left: 16px;  
padding-right: 8px;
padding-top: 0px;
padding-bottom: 15px;
width: 0px;
height: 10px;
Categories: CSS Tags: ,