I need to select any headings with inline style 'text-align: center' in my CSS so that I can apply an ::after styling to them. Is there any way to do this? It is for a WordPress CMS so I specifically need to be able to style anything that can be used in the WYSIWYG editor by the client.
My stylesheet is as follows for any headings with class .textcenter:
.textcenter h1::after {
content: '';
display: block;
margin: 5px auto 0;
width: 150px;
height: 2px;
background: rgb(18,113,183);
background: linear-gradient(90deg, rgba(18,113,183,1) 0%, rgba(18,113,183,1) 50%, rgba(152,195,59,1) 50%, rgba(152,195,59,1) 100%); }
I need the same to apply for anything that is created by the client such as:
<h1 style="text-align: center;">....</h1>
Is there anyway to do that?
TIA