Is it possible to set the src
attribute value in CSS? At present, what I am doing is:
There is a solution that I found out today (works in IE6+, FF, Opera, Chrome):
How it works:
background-size
for example: background-size:cover;
which fits your image into the allotted space. It also works for submit-input-images, they stay clickable.
See live demo: http://www.audenaerde.org/csstricks.html#imagereplacecss
Enjoy!