I want to set a pseudo element of a div on the original div.
The problem is that the text of the div is centered.
Here is an example:
#a:after{
content:"Text";
position:absolute;
left:0;
color:red;
}
<div style="width:100%;text-align:center;">
<p id="a">Text</p>
</div>
Why is the pseudo element not affected by the div style?