Link to home
Start Free TrialLog in
Avatar of dlearman1
dlearman1Flag for United States of America

asked on

How to style placeholder text?

The following partial code represents a Bootstrap 4 form. I am trying to style the placeholder text, but haven't been able to select it.  Using FireFox browser, I've tried variations  of the following: Hopefully anybody show me how this is done.

CSS
.l-footer {
  display: flex;
  position: relative;
  flex-flow: column wrap;
  justify-content: flex-start;
  align-items: center;
  background-color: $black-black;

  &-left-section {
    flex-basis: 1 1 0;
    display: block;
    order: 3;
    text-align: center;
    border: .1rem solid $white-white;
    padding: 2rem 3rem;
    margin: 0 auto;
    max-width: 90vw;
  
    &__form-container {
      display:block;
      min-width: 100%;
      margin-bottom: 3rem;

       &form.newsletter-signup::-moz-placeholder {   /* Firefox 19+   For newer FF also tried  &form.newsletter-signup::placeholder  */
        @media (max-width: 319.98px) {
          font-size: $font-size-base * .65;
          color:green;
        }

Open in new window



HTML
<div class="l-footer container-bleed">
        <div class="l-footer-left-section container">
          <p class="l-footer-left-section__newsletter">
            SUBSCRIBE TO MY<br>QUARTERLY<br>NEWSLETTER
          </p>

          <div class="l-footer-left-section__form-container">
            <form class="newsletter-signup" action="http://www.stevehonnenrealtor.com/sendForm.php" name="form-signup-newsletter">
              <input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER">
              
              <div class="form-group">
                <label class="sr-only" for="input-email">Email</label>
                <input type="email" class="form-control" id="input-email" placeholder="Enter Your Email">
              </div>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dlearman1

ASKER

Thanks Julian. This works great.
You are welcome.