:before and :after

Opera 5: Text works, image doesn't.

Mozilla, Safari and Opera 7: Works.

This is a test of :before and :after, with which you can place text or an image before and after each HTML element.

Testsheet:

p.test:before {
	content: url(../browsers/pix/logo_mozilla.gif);
}
p.test:after {
	font-style: italic;
	content: " and some text after";
}

Test paragraph width class="test".

Test paragraph width class="test" and overflow: auto.