W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2011

content -- a DOM CSS2 property/attribute?

From: Cyril <cyril2@SAFe-mail.net>
Date: Thu, 06 Jan 2011 02:07:35 +0300
Message-ID: <4D24F9B7.1060400@SAFe-mail.net>
To: www-dom@w3.org
Dear Sirs,

Could you help me to put to use "content", a DOM CSS2 property 
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)}

<script type="text/javascript">
function Change(A_Span)
  {A_Span.style.content = 'url(image2.png)'

  <tr><td>Text <span class="MySpan" onclick="Change(this)">Inner text 
  <tr><td>Text <span class="MySpan" onclick="Change(this)">Inner text 
  <tr><td>Text <span class="MySpan" onclick="Change(this)">Inner text 

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,
Received on Friday, 7 January 2011 08:03:26 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:17 UTC