Re: css code to change the text color to black

Solved

css code to change the text color to black

DusanKudela
Excursionist
23 1 2

Hello,

 

can someone pls help me to make the text in my contact form visible? I mean the prefilled text like "Name" and "Phone number". Currently it is white so it is barely visible against the white background.ffwfw.jpg

Accepted Solutions (2)
namphan
Shopify Partner
1335 164 199

This is an accepted solution.

Hi @DusanKudela,

Please change code:

.contact-form label.label--hidden {
        position: relative !important;
}
Coffee tips fuels my dedication.
Shopify Development Service
Need help with your store? namphan992@gmail.com

View solution in original post

namphan
Shopify Partner
1335 164 199

This is an accepted solution.

Hi @DusanKudela,

Please change code:

.form-vertical input::placeholder,
.form-vertical textarea::placeholder {
    color: #333;
}
Coffee tips fuels my dedication.
Shopify Development Service
Need help with your store? namphan992@gmail.com

View solution in original post

Replies 15 (15)

oscprofessional
Shopify Partner
16115 2409 3123

Hello @DusanKudela Please add the below css
go to the online store > Edit code > assets > theme.css or base.css and paste this code

#contact_form input {
	color: #000;
}

oscprofessional_0-1723202273480.png

 

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing | Oscp Upsell & Cross sell App : Free | Oscp Sales & Volume Discount App : Free | Custom Pricing Wholesale App : Free
DusanKudela
Excursionist
23 1 2

I tried but did not work

DusanKudela
Excursionist
23 1 2

is there another way? I have only the theme.scss.liquid in assets

namphan
Shopify Partner
1335 164 199

Hi @DusanKudela,

Please go to Actions > Edit code > Assets >theme.scss.liquid file and paste this at the bottom of the file:

.contact-form label.label--hidden {
    color: #333;
    position: relative;
}
Coffee tips fuels my dedication.
Shopify Development Service
Need help with your store? namphan992@gmail.com
DusanKudela
Excursionist
23 1 2

thank you but this does not work

namphan
Shopify Partner
1335 164 199

This is an accepted solution.

Hi @DusanKudela,

Please change code:

.contact-form label.label--hidden {
        position: relative !important;
}
Coffee tips fuels my dedication.
Shopify Development Service
Need help with your store? namphan992@gmail.com
DusanKudela
Excursionist
23 1 2

I would like it to look like this:oscprofessional_0-1723202273480.png

DusanKudela
Excursionist
23 1 2

Now it is ok but not what I wanted. I will settle on yout solution. Thank you.

DusanKudela
Excursionist
23 1 2

actually it works but differently. The text was slightly visible above the fields

namphan
Shopify Partner
1335 164 199

Hi @DusanKudela,

With the current HTML structure, you can only display like I described, or like this:

Screenshot.png

Coffee tips fuels my dedication.
Shopify Development Service
Need help with your store? namphan992@gmail.com
DusanKudela
Excursionist
23 1 2

it is ok. But when you look closer you can see the original white text in the fileds. 

namphan
Shopify Partner
1335 164 199

This is an accepted solution.

Hi @DusanKudela,

Please change code:

.form-vertical input::placeholder,
.form-vertical textarea::placeholder {
    color: #333;
}
Coffee tips fuels my dedication.
Shopify Development Service
Need help with your store? namphan992@gmail.com
DusanKudela
Excursionist
23 1 2

You did it!

DusanKudela
Excursionist
23 1 2

namphan
Shopify Partner
1335 164 199

Hi @DusanKudela,

Thank you.

If you have any questions, you can contact me directly.
Happy to help you 😊

Coffee tips fuels my dedication.
Shopify Development Service
Need help with your store? namphan992@gmail.com