Placeholder color in 2 different forms

Hi I used the next code for change the color of the placeholder, it is working, but I need use a different color for another form, how can I do it? the name of the form is form2

<style type="text/css">
.w-input::-webkit-input-placeholder { /* WebKit browsers */    color:    #fff;}
.w-input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */    color:    #fff;    opacity: 1;}
.w-input::-moz-placeholder { /* Mozilla Firefox 19+ */    color:    #fff;    opacity: 1;}
.w-input:-ms-input-placeholder { /* Internet Explorer 10+ */    color:    #fff;}
</style>

thx in advance:)

Great question. You will want to add a class to the input field and then duplicate and update your code.

For the example say you create a new class classed “new-color” Then update the code.

     <style type="text/css">
.w-input::-webkit-input-placeholder { /* WebKit browsers */    color:    #fff;}
.w-input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */    color:    #fff;    opacity: 1;}
.w-input::-moz-placeholder { /* Mozilla Firefox 19+ */    color:    #fff;    opacity: 1;}
.w-input:-ms-input-placeholder { /* Internet Explorer 10+ */    color:    #fff;}

 .w-input.new-color::-webkit-input-placeholder { /* WebKit browsers */    color:    #fff;}
    
    </style>

Hope that helps.

1 Like

it works perfectly, many thx!

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.