I'm having an issue whereby a textarea element on my page is getting some inline styling applied when rendering on the front-end - but the styling isn't in my HTML, and I've tried overwriting it using !important in my styling.
I've found someone with a similar issue here: similar issue - but no one has been able to resolve that.
So, my HTML for the textarea is as follows:
<textarea class="contact-field focus-hide" id="message" name="message" required autocomplete="off"></textarea>
My CSS is as follows:
.contact-field {
background-color: #FFFFFF;
border: none;
padding: 10px 10px;
font-size: 16px;
color: #000000;
outline: none;
display: block;
margin-bottom: 10px;
width: 100%;
transition: all 300ms ease-in-out;
box-sizing: border-box;
}
.contact-field:focus {
background-color: rgba(0,0,0,0.5) !important;
color: #FFFFFF;
}
And yet, when the page renders some inline styling has mysteriously appeared out of nowhere, which breaks the :focus change in my css:
<textarea class="contact-field focus-hide" id="message" name="message" required="" autocomplete="off" data-gramm="true" data-txt_gramm_id="c66481f6-0696-cdf9-ee03-18973388ba4a" data-gramm_id="c66481f6-0696-cdf9-ee03-18973388ba4a" spellcheck="false" data-gramm_editor="true" style="z-index: auto; position: relative; line-height: normal; font-size: 16px; transition: none 0s ease 0s; background: transparent !important;"></textarea>
Oh, and another thing, this isn't happening on my local machine - only when I upload it to my web server. Is it possible there's something on the server causing this issue?!
Hopefully someone is able to resolve this for me? It's so frustrating!
Thanks