• Resolved harveyl12

    (@harveyl12)


    I need some help with some CSS on my site…

    If you go to https://hcldesign.co.uk/ and then scroll down to the contact form you can see that when you click into a field, type into a field, or have an error in a field it changes the color of that filed and the borders.

    1. I can’t figure out what CSS i need to add to change the color of the fields when they are selected, have characters entered in them or have an error? including the border color.

    2. I also can’t figure out how to change the hover color for the text and button on the ‘send’ button.

    Any help?

    Thanks,

    Harvey

    The page I need help with: [log in to see the link]

Viewing 14 replies - 16 through 29 (of 29 total)
  • Thread Starter harveyl12

    (@harveyl12)

    Yep you are correct, sorry i missed this.

    Thread Starter harveyl12

    (@harveyl12)

    There looks to be a autofill colour as well

    I am trying this code

    input:-webkit-autofill {
        background-color: rgba(75, 220, 56, 0.25);
        background-image: none;
        color: rgb(0, 0, 0);
    }

    to change the colour from yellow but its not working?

    Any ideas?

    Thread Starter harveyl12

    (@harveyl12)

    I’ve tried all sorts now and cant work this one out for the life of me ahaha

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I’m not sure I understand. In my understanding I would just use the ‘color’ style.

    Thread Starter harveyl12

    (@harveyl12)

    I have also tried using the color style.

    I cant seem to override the auto filled field color with any though? Any idea if i am using the correct selectors or what selector i need to use?

    Thanks,

    Harvey

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Does this do what you want:

    
    /* Valid input value colour */
    body div.wpforms-container-full .wpforms-form .wpforms-valid {
        color: white;
    }
    
    /* Invalid input value colour */
    div.wpforms-container-full .wpforms-form .wpforms-field input.wpforms-error {
        color: red;
    }
    
    Thread Starter harveyl12

    (@harveyl12)

    It is that there looks to be some CSS that sets the color of the field if an auto-fill option has been used.

    I am needing to change the color the field goes when the field is auto filled.

    Do you get what I mean? Sorry its an awkward one to explain.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    What do you mean by auto filled?

    Thread Starter harveyl12

    (@harveyl12)

    Hi,

    please see here – https://ibb.co/gve8Bk The code changing the colour.

    If you use chrome and add some auto fill info https://support.google.com/chrome/answer/142893?co=GENIE.Platform%3DDesktop&hl=en this shows how to add autofill info manually into chrome. But autofill info is usually automatically gathered by a browser to allow quicker entry of field in forms on a site like the below image.

    https://ibb.co/kyLRxQ

    Does this explain it?

    Thanks,

    Harvey

    Thread Starter harveyl12

    (@harveyl12)

    And when the contact form uses the autofill details it is changing the field color to yellow. As you can see in the code i provided in the first image. I just can’t seem to change this

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Oh autofilled by the browser, see this article: https://developer.mozilla.org/en-US/docs/Web/CSS/:-webkit-autofill

    The user agent style sheets of many browsers use !important in their :-webkit-autofill style declarations, making them non-overrideable by webpages without resorting to JavaScript hacks.

    Thread Starter harveyl12

    (@harveyl12)

    Ohh? So is it Chrome that is actually making the field yellow when autofill is used rather than my contact form? As in firefox i see this does not happen when using autofill?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Yes, this is a browser feature and is not specific to your website or platform (WordPress).

    Thread Starter harveyl12

    (@harveyl12)

    Okay thank you ??

Viewing 14 replies - 16 through 29 (of 29 total)
  • The topic ‘WPForm CSS Help’ is closed to new replies.