- From: Cyril <cyril2@SAFe-mail.net>
- Date: Thu, 06 Jan 2011 02:07:35 +0300
- To: www-dom@w3.org
Dear Sirs, Could you help me to put to use "content", a DOM CSS2 property (http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/css.html#CSS-CSS2Properties-content)? By this property, I want to substitute an image which is inserted with "before" pseudo-element. I use the property in code as follows: <style type="text/css"> .... [class=MySpan]:before {content: url(image1.png)} .... </style> <script type="text/javascript"> .... function Change(A_Span) {A_Span.style.content = 'url(image2.png)' } .... </script> <table> <tr><td>Text <span class="MySpan" onclick="Change(this)">Inner text 1</span>.</td></tr> <tr><td>Text <span class="MySpan" onclick="Change(this)">Inner text 2</span>.</td></tr> <tr><td>Text <span class="MySpan" onclick="Change(this)">Inner text 3</span>.</td></tr> </table> The above doesn't change the image in my Netscape 7.2 on Windows98 platform. Do I everything all right with the "content"? Or maybe you suggest me something else? Best regards, Cyril.
Received on Friday, 7 January 2011 08:03:26 UTC