useful CSS hack – replace an image with an.. er.. image
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.
Sarah Lewis 2007-05-04 16:45:04