CSS ::after command

I am using CSS to change the content of a page format and content.

With the following code, the color and font is changed correctly. THe ::after staretment has no effect.

Any ideas?
$np=“lop”;

		?>
		<style> 	
		#id_StyleViewNewY_form2 {
		  color:  red;
		  font-style: italic;
		}

		#id_StyleViewNewY_form2
		::after 
		{content: "<?php echo "$np" ?>";
		}	

		</style>
		<?php