Support » Plugin: Contact Form 7 » Styling first_as_label of select menu.

  • Resolved shikarishuffle

    (@shikarishuffle)


    So I’m trying to style my contact form although styling the select menu has been a bit difficult.

    I want the first option of the menu to be a washed out color instead of black so it can fit in with the rest of the placeholder text.

    I found a way to style the first option of my select menu fine (using the attached CSS), although the default styling still overrides it to black, as this is the first option and automatically selected.

    Any workaround for this or have I missed something painfully obvious?

    CSS

    .wpcf7-form select option[value=""]{
    color:#058C17 !important;
    }

    cf7

    <p><br />
        [text* your-name placeholder "NAME"] </p>
    
    <p><br />
        [email* your-email placeholder "EMAIL"] </p>
    
    <p><br />
        [text* your-phone placeholder "PHONE"] </p>
    
    <p><br />
    [select* your-subject first_as_label "SUBJECT" "GENERAL ENQUIRY" "PROPOSAL" "ENQUIRY" "OTHER"]
     </p>
    
    <p><br />
        [textarea your-message placeholder "MESSAGE"]</p>
    
    <div>
        <div style="float: left; width: 50%">[cf7sr-simple-recaptcha]</div>
        <div style="float: right; width: 50%"> [submit "Send"]</div>
    </div>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.