On Jun 4, 2008, at 11:27 AM, 5h4rk @ gmail wrote:
> Hello, I just wondering if it's ok to use background-image for an img
> tag, is it buggy? Otherwise I'd have to add an extra div to the img
> which i don't want.
like so ?
css:
img {background: #ccc url(path/to/background-image.png); padding:1ex;}
html:
<img src="image.jpg" alt="my image">
No idea how 'buggy' that is as I've never really tested this, but the
above snippet works across most browsers (not sure IE 6). In a simple
test case, that is.
Philippe
---
Philippe Wittenbergh
http://l-c-n.com/
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/