Skip to content Skip to sidebar Skip to footer

Background-image Url Not Working

.dict { background-image: url('dict.png'); } This does not appear to work as I would like it to. It doesn't display an image? Can so

Solution 1:

since you want your image as tiny icon in the background so that nobody could copy it, then you can do the following.

.dict {
   padding-left: 66px;
   background: url(dict.png) no-repeat left center; 
}

here i am assuming that your icon's size is 50 px and for left padding from that icon i added 16 px to it, so that your icon doesn't get covered by your content inside the div.

so it should give some effect like :

enter image description here

Post a Comment for "Background-image Url Not Working"