W3C home > Mailing lists > Public > www-style@w3.org > August 1999

Re: Inserting text with CSS

From: Daniel Glazman <Daniel.Glazman@der.edf.fr>
Date: Wed, 25 Aug 1999 10:38:38 +0200
Message-ID: <37C3AB8D.CFBF797D@der.edf.fr>
To: Ian Brockbank <ian@indigo-avs.com>
CC: "'www-style@w3.org'" <www-style@w3.org>
Ian Brockbank wrote:
> 
> Hi all,
> 
> is there any way using CSS of inserting text?  This would be useful
> for consistent labelling.

There is one way, using :after and :before pseudo-elements. But it does
not "insert" content in the document. It adds content to the rendering
tree ; so if you save the document, this content does not appear in the
file:

> <h1 class="pagehead">Some Stuff</h1>
> 
> and have it render as
> 
> Dancing Forth Aug-Sep 1999: Some Stuff


Use the following rule :

	H1:before { content : "Dancing Forth Aug-Sep 1999" }

</Daniel>
Received on Wednesday, 25 August 1999 04:39:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:00 GMT