Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #956910

    Hi, I gave a contact form on my site the custom class of “contactform” and I want to make all the field placeholders white.

    I used this code but it didn’t work. What did I do wrong?

    #contactform ::-webkit-input-placeholder {
      color: #ffffff !important;;
    }
    #contactform ::-moz-placeholder { 
      color: #ffffff !important;;
    }
    #contactform :-ms-input-placeholder { 
      color: #ffffff !important;;
    }
    #contactform :-moz-placeholder { 
      color: #ffffff !important;;
    }
    #956920

    first of all – i don’t know if two semicolons at the end will come into conflict.
    try this first.

    second: you have no browser plattform for firefox and consorten :
    and think of opacity for firefox – because it has set this to 0.8

    ::placeholder { 
        color: #fff !important;
        opacity: 1; 
    }

    _______________________

    by the way:
    you can change / add placeholder text (even if you have not choosen that option on enfold dialog with that here on functions.php of child-theme
    Change it to your page-id

    function change_placehoder_txt() {
    if( is_page(2604) ) {
    ?>
    <script type="text/javascript">
      jQuery('#avia_1_1').attr('placeholder', '  Anything you like*');
      jQuery('#avia_2_1').attr('placeholder', '  Anything you like*');
     </script>
    <?php
    }
    }
    add_action('wp_footer', 'change_placehoder_txt');

    The easiest way to get distance to the Input field is to insert spaces on the text.

    #956925

    I don’t want to use Page.ID

    I want to use the custom CSS class I added to the element.

    Not sure I understand how your code helps me do what I want.

    #956927

    this is what is enough for modern browser:

    ::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
        color: white !important;
        opacity: 1; /* Firefox */
    }
    :-ms-input-placeholder { /* Internet Explorer 10-11 */
        color: white !important;
    }
    ::-ms-input-placeholder { /* Microsoft Edge */
        color: white !important;
    }
    #956931

    that is an additonal information and separated with a separator
    it is to individualize the placeholder text
    you can see here the effect: https://webers-testseite.de/kontakt/

    by the way:
    you can change / add placeholder text (even if you have not choosen that option on enfold dialog with that here on

    #956935

    I’m sorry Guenni007 but you’re solutions are not really related to what I was asking and are not giving me the answer I need.

    #956936

    it is hard to help without a link
    but first solution was to try get rid of doubled semicolons
    second : add rule for firefox and modern browsers – you have all without :

    #contactform ::placeholder { 
        color: #fff !important;
        opacity: 1; 
    }

    the webkit rule seems to be obsolete since Safari 10

    #956947

    It’s still not working after I removed the double semicolons.

    #956955

    it seems enfold had set up a rule with .main-color class so try to be more specific with:
    (normaly the ID should overwrite a rule with class don’t know why it does not)

    .main_color #contactform ::placeholder { 
    color: #fff !important;
    opacity: 1
    }
    .main_color  #contactform ::-webkit-input-placeholder {
      color: #fff !important;
    }
    .main_color  #contactform ::-moz-placeholder { 
      color: #fff !important;
    }
    .main_color  #contactform :-ms-input-placeholder { 
      color: #fff !important;
    }
    .main_color  #contactform :-moz-placeholder { 
      color: #fff !important;
    }

    it comes from Enfold Options – Main Content – Secondary font color

    #956962

    Didn’t work.

    When I use this code:

    ::-webkit-input-placeholder {
      color: #ffffff !important;;
    }
    ::-moz-placeholder { 
      color: #ffffff !important;;
    }
    :-ms-input-placeholder { 
      color: #ffffff !important;;
    }
    :-moz-placeholder { 
      color: #ffffff !important;;
    }

    It does work but it changes it globally acroress the site and I only want to change the specific element I created the custom CSS class for.

    #957171

    Wait for mods or post your link – i don’t know where your custom ID is.

    How many contact forms do you have on that page.
    maybe the .page-id-12345 will make it for you.

    maybe for not globaly set the rule has to include the input bzw textarea etc tag

    .main_color  #contactform input::-webkit-input-placeholder { 
    color: #ffffff !important;
    }
    .main_color  #contactform input:-moz-placeholder { 
    color: #ffffff !important;
    }
    .main_color  #contactform input::-moz-placeholder { 
    color: #ffffff !important;
    }
    .main_color  #contactform input:-ms-input-placeholder {
    color: #ffffff !important;
    }
    .main_color  #contactform input::-ms-input-placeholder {
    color: #ffffff !important;
    }
    .main_color  #contactform textarea::-webkit-input-placeholder { 
    color: #ffffff !important;
    }
    .main_color  #contactform textarea:-moz-placeholder { 
    color: #ffffff !important;
    }
    .main_color  #contactform textarea::-moz-placeholder { 
    color: #ffffff !important;
    }
    .main_color  #contactform textarea:-ms-input-placeholder {
    color: #ffffff !important;
    }
    .main_color  #contactform textarea::-ms-input-placeholder {
    color: #ffffff !important;
    }
    #957230

    I have it on a number of pages so I prefer to use the custom CSS instead of page ID.

    #958000

    Hi,

    It’s a custom css CLASS attribute so the css codes should be this one..

    .contactform ::-webkit-input-placeholder {
      color: #ffffff !important;;
    }
    .contactform ::-moz-placeholder { 
      color: #ffffff !important;;
    }
    .contactform :-ms-input-placeholder { 
      color: #ffffff !important;;
    }
    .contactform :-moz-placeholder { 
      color: #ffffff !important;;
    }

    Best regards,
    Ismael

    #958125

    Thanks!

    #958331

    thats why i like to see the page.
    on source code this will be the easiest way to see that on first view.

    #958404

    Hi,

    Thank you @guenni007 for helping out :)

    @bakbek Hope your issue is sorted?

    Best regards,
    Vinay

Viewing 16 posts - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.