Change input background color

Hi,

I have tried to change the background color in the contact form input tag.
I added this in my custom.css :

input[type="text"]:focus, input[type="tel"]:focus, input[type="password"]:focus, input[type="email"]:focus, textarea:focus, select:focus
{
  background-color: #b7b7b7;
  border-color: #db0b30;
  color:#0F3;
}

The border and the color have changed, but not the background-color.
So I opened the variable.css file to change it directly in the beginning.

BUT in this file the background attribute in indicated as IMPORTANT
input[type="text"]:focus, input[type="tel"]:focus, input[type="password"]:focus, input[type="email"]:focus, textarea:focus, select:focus {
        background-color: #E9F5FC !important;
        border-color: #d5e5ee;
        color: #1982C2;
    }   

Can I change it anyway ?
Thanks.


Comments

  • Hi,

    please do not modify any theme core files! What we recommend now is go back to original theme files and send us url to page where you have contact form and we`ll find right css to change background color for button.
  • OK.
    Here is a url when the issue happens :
    http://www.accrochecoeur-nantes.fr/contact/

    Thanks.
  • To change this yellow button background color, please use below css:
    a.button_theme, a.tp-button.button_theme, button, input[type="submit"], input[type="reset"], input[type="button"] { background-color: #000 !important; }
  • Sorry, but I don't want to change the button background color, but these tags

    input[type="text"]:focus, input[type="tel"]:focus, input[type="password"]:focus, input[type="email"]:focus, textarea:focus, select:focus

    which are blue when you click in it.


  • I test it again with the !important information, and it works.
    Thanks and sorry to disturb.

    Cheers.
  • For people interesting, here my code

    input[type="text"]:focus, input[type="tel"]:focus, input[type="password"]:focus, input[type="email"]:focus, textarea:focus, select:focus
    { background-color: #CCC !important;
      border-color: #db0b30;
      color:#626262;
    }
  • Ohh sorry. We thought you meant something else. But we`re glad you found right code for your needs. Thanks for explanation!
Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.