Fred Janon wrote:
> I am creating dynamically an <img> element in Javascript. I set the 
> "src" attribute to a default image file path i.e. 
> 'src="images/defaulticon.jpg"' and I would like to be able to 
> override that path using CSS. I checked my CSS books and the list 
> previous posts and could not find anything.

Look for generated content...
<http://www.w3.org/TR/2004/CR-CSS21-20040225/generate.html>
<http://www.w3.org/TR/css3-content/>

CSS example:
Element {content: url(../new-image.png);}

Note: browser support is still pretty weak.

Live example:
<http://www.gunlaug.no/contents/molly_1_20.html>
...compare cat-image in main column across several browsers - and don't
forget to check in Opera.

While you're there: look for the name "Internet Explorer 6" in the text
and compare that too. Same thing.

regards
        Georg
-- 
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to