Forum Moderators: not2easy

Message Too Old, No Replies

Adding html text to a styled element

         

korkus2000

4:08 pm on Mar 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This maybe a stupid question but I have been searching all morning. If I have a class .note and I want all elements styled with note to have the word Note in bold and green added to the front of the element can it be done in CSS? There is an automated script converting stuff to html and adding styles but we can't uncompile the app to make it add the note text during conversion. Can CSS do this?

Nick_W

4:13 pm on Mar 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sure, in theory ;)
Generated Content: Before and After Pseudo Elements [w3.org]

Support is SLIM

Nick

korkus2000

4:28 pm on Mar 21, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Nick. Man that would be a handy function. Looks like my IE 6 doesn't support it. Any hacks anyone knows about?