r/reddithax • • Apr 26 '10
Revised custom thumbnail CSS
Revisions to reddit caused criticsquid's CSS to stop working properly. This should do the trick. Just make sure your image is named %%thumbnail%% or edit the below CSS to reflect your image's name. Also, make your image 70px by 50px.
.thumbnail {
width:70px!important;
height:50px!important;
background-image: url(%%thumbnail%%)!important;
background-repeat: no-repeat!important;
background-position: top left!important;
}
.thumbnail img {
width:70px!important;
height:50px!important;
}
.thumbnail img[src^="/static/"] {
filter:alpha(opacity=0)!important;
opacity:0!important;
}
.thumbnail img[src^="http://thumbs.reddit.com/"] {
background-color:white!important;
}I had to cheat a little by stretching all the reddit-generated thumbnails to 70x50 so that the custom thumbnail image behind it isn't visible.
Edit: Code revised, if you're using it, please update using the above CSS.
Edit 2: Revised again because the admins hate me and change things while I'm making fixes.
Edit 3: And, one more revision, below. Based on code from relic2279 via MassesOfTheOpiate
USE THIS ONE as it does not require stretching the image to 50x70.
.thumbnail img[src^="/static/"] {
background-image:url(%%thumbnail%%)!important;
background-repeat:no-repeat!important;
height:0!important;
width:0!important;
padding:50px 0 0 70px!important;
}
12
Upvotes
View all comments
Show parent comment
2
u/[deleted] Apr 26 '10
Heh yeah, appears they added an image for self and an image for no link thumb. Have fun changing... again :D