Im trying to use a pseudo element for a textarea and use the content"" attribute to show my text or icon in the center. A way to do this would be to use the background image but I want a pure css solution instead something along this:
.myelement::before {
content:"my element centered inside the text area";
font-size: 40px;
text-align:center;
}
known working method with image:
textarea {
background: url("myimage-centered.png") center center no-repeat;
}
I'm guessing the structure would be something like this:
<i class="myelement"></i>
<textarea class"txtarea"></textarea>
How can I achieve this with the 1st code above?