Jump to content

Form input text is black on a black background

Go to solution Solved by creedon,

Recommended Posts

Site URL: https://byalliegross.com/get-in-touch

I had to use code to change the color of the text to white when you type in forms for my client's site, and it's working for every field except the message field, which still comes up black. Is there anything I can do to fix it?

 

Here's the code I used:

#block-yui_3_17_2_1_1621308086578_4461 input {color:white!important}

#block-f13bf122e57597604cf0
input {color:white!important}

#block-yui_3_17_2_1_1621308086578_4461
input {color:white!important}

 

Thanks!

Link to comment

Use the following CSS.

#block-f13bf122e57597604cf0 .form-wrapper .field-list .field .field-element {

  color : white;
  
  }

This is for v7.1 and specific to the poster's need.

Let us know how it goes.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

An explanation why your code didn't work. You targeted input in your selectors. Not all form text input field elements are of type input. They're input element with attribute/value type="text" and textarea element.

The code I posted uses SS's selector with the addition of the code block id at the beginning.

Edited by creedon

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • Solution

An expansion on my code. By using LESS syntax which is supported in Design > Custom CSS you can make having to change multiple forms a bit less repetitive.

// change form text inputs color to white, uses LESS syntax

#block-f13bf122e57597604cf0, // get in touch
#block-yui_3_17_2_1_1621308086578_4461, // ?
twc-selector /* dummy selector so that each selector line above ends with a
                comma */
  {
  
    .form-wrapper .field-list .field .field-element {
    
      color : white;
      
      }
      
    }

 

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • 3 weeks later...
On 11/16/2021 at 10:18 PM, creedon said:

An expansion on my code. By using LESS syntax which is supported in Design > Custom CSS you can make having to change multiple forms a bit less repetitive.

// change form text inputs color to white, uses LESS syntax

#block-f13bf122e57597604cf0, // get in touch
#block-yui_3_17_2_1_1621308086578_4461, // ?
twc-selector /* dummy selector so that each selector line above ends with a
                comma */
  {
  
    .form-wrapper .field-list .field .field-element {
    
      color : white;
      
      }
      
    }

 

perfect, thank you so much!!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.