Can’t display an image sprite
-
Hello,
Please help me. I am have a really tough time trying to display an image sprite.
In used SpritePad to generate a test Sprite PNG ( see sprites.png file attached) as well a the appropriate Sprite CSS:
.icno-taza de cafe 180×180, .icono-taza cafe 128×128 {
background: url(https://labolsitadecafe.com/wp-content/uploads/2017/01/sprites.png) no-repeat;
}.icno-taza de cafe 180×180 {
background-position: 0 0;
width: 180px;
height: 180px;
}.icono-taza cafe 128×128 {
background-position: -336px -237px ;
width: 128px;
height: 128px;I then added the above Sprite CSS to my child theme’s style.css.
I then added the following html to a widget in order to display the .icno-taza de cafe 180×180 image:
I also tried:
<div class ═ “.icno-taza de cafe 180×180”></div>
But no image displays.
I am stumped.
Patrick Yepez
- The topic ‘Can’t display an image sprite’ is closed to new replies.