useful CSS hack - replace an image with an.. er.. image

This post was written 5 years ago.
Wed, 11 Oct 2006
via hicksdesign:-
img {
width: 0;
padding-left: 20px;
background: url(mynewimage.gif) no-repeat;
}
I have a real-world example of where this would be useful in plone skinning - in some places inline images are still used for icons (here and there - they are generally being phased out). At the moment I usually set them to display:none and apply padding and background image to the containing element, but this may be a better solution.

archived comments
Just wanted to say thanks for this. :) It is exactly what I need for over-riding some annoying hard-coded images in a blog I'm skinning.

Sarah Lewis 2007-05-04 16:45:04
This post was written 5 years ago, which in internet time is really, really old. This means that what is written above, and the links contained within, may now be obsolete, inaccurate or wildly out of context, so please bear that in mind :)
Tags: plone / css /
Comments
blog comments powered by Disqus