div.file-3D, div.videofile{ position: relative; width: 100%; height: 100%; } div.file-3D .stl-file{ background-image: url(images/msu-3D.png); background-repeat: no-repeat; width: 100%; height: 100%; display: block; position: absolute; margin: 5px; background-position: 0 0; } div.videofile .mp4-file{ background-image: url(images/msu-play-verysmall.png); background-position: center; background-repeat: no-repeat; width: 100%; height: 100%; display: block; position: absolute; padding: 5px; } .carousel-thumb .stl-file{ background-size: 38px; } .item .stl-file{ background-size: auto; } .item .mp4-file{ display: none; }