ruby on rails - Varying form-control styles on the same page Bootstrap CSS -
is there way make placeholder text in form white in 1 section , gray in section?
haml:
signup form 1:
= form_tag splash_signup_path, role: :form, :class=>'form-horizontal', :remote=>true .col-sm-12 .input-group = text_field_tag :signup_email, '', :class=>'form-control', :placeholder=>'enter email address receive lastest updates' %span.input-group-btn = submit_tag 'submit', :class=>'btn btn-default'
signup form 2:
= form_tag splash_signup_path, role: :form, :class=>'form-horizontal', :remote=>true .col-sm-12 .input-group = text_field_tag :signup_email, '', :class=>'form-control', :placeholder=>'enter email address receive lastest updates' %span.input-group-btn = submit_tag 'submit', :class=>'btn btn-default'
css:
.form-control::-webkit-input-placeholder { color: white; } .form-control:-moz-placeholder { color: white; } .form-control::-moz-placeholder { color: white; } .form-control:-ms-input-placeholder { color: white; } .signup { margin-top: 70px; margin-bottom: 5px; position: absolute; bottom: 20px; } .signup-bottom { top: 20px; margin-bottom: 20px; }
edit: removed irrelevant code clarity
would work?
.signup .form-control::-webkit-input-placeholder { color: white; } .signup .form-control:-moz-placeholder { color: white; } .signup .form-control::-moz-placeholder { color: white; } .signup .form-control:-ms-input-placeholder { color: white; } .signup-bottom .form-control::-webkit-input-placeholder { color: grey; } .signup-bottom .form-control:-moz-placeholder { color: grey; } .signup-bottom .form-control::-moz-placeholder { color: grey; } .signup-bottom .form-control:-ms-input-placeholder { color: grey; }
Comments
Post a Comment