Problems with css email registration box

Asked

Viewed 102 times

0

Hello, I have a little problem adding an email box on my blog, the ones that sign up for the user to receive email updates. I put the color of the white font but nn makes effect even adding "! Mportant".

here is the image

inserir a descrição da imagem aqui

/* CSS EMAIL SUBSCRIBE */
#email-subscribe {padding:20px;background:#4dbfd9;}
#email-subscribe h4.title {font-size:16px;color:#FFFFFF;font-weight:400;line-height:1;text-align:center;text-transform:uppercase;margin-bottom:0;}
#email-subscribe h4.title span {display:inline-block;font-weight:700;font-size:30px;margin-top:15px;}
#email-subscribe input.email-field {color:#fff;background:#4dbfd9;margin-top:0px;}
#email-subscribe input {color:#fff;border:1px solid rgba(255,255,255,.4);width:100%;text-align:center;-moz-box-sizing:border-box;box-sizing:border-box;padding:0.662em 1.247em;margin:0;box-shadow:none;outline:0;border-radius:2px;font-size:14px;line-height:19px;}
#email-subscribe input.submit {background:#4dbfd9;color:#fff;margin-top:20px;font-size:14px;font-weight:300;cursor:pointer;transition:all .3s;}
#email-subscribe input.submit:hover {background:#fff;color:#4dbfd9!important}
<div class="email-subscribe" id="email-subscribe">
<h4 class="title">Receba Atualizações<br /> <span>EM SEU EMAIL</span></h4>
<form action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=blogspot/vYnG', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true" _lpchecked="1">
<input class="email-field" type="text" value="" placeholder="digite seu e-mail aqui" name="email" />
<input type="hidden" value="blogspot/vYnG" name="uri" /><input type="hidden" name="loc" value="pt_BR" />
<input class="submit" name="submit" type="submit" value="Cadastre-se agora" />
</form>
<div class="clear"></div></div>

2 answers

2

Whoa, whoa, whoa, whoa. From what I saw you trying to change the color of the text, but in this case what you need to change is the color of the placeholder and for that add this line as I did here. And I hope I’ve helped!!!

 #email-subscribe input::-webkit-input-placeholder { 
   color: #fff;

}

/* CSS EMAIL SUBSCRIBE */
#email-subscribe {padding:20px;background:#4dbfd9;}
#email-subscribe h4.title {font-size:16px;color:#FFFFFF;font-weight:400;line-height:1;text-align:center;text-transform:uppercase;margin-bottom:0;}
#email-subscribe h4.title span {display:inline-block;font-weight:700;font-size:30px;margin-top:15px;}
#email-subscribe input.email-field {color:#fff;background:#4dbfd9;margin-top:0px;}
#email-subscribe input {color:#fff;border:1px solid rgba(255,255,255,.4);width:100%;text-align:center;-moz-box-sizing:border-box;box-sizing:border-box;padding:0.662em 1.247em;margin:0;box-shadow:none;outline:0;border-radius:2px;font-size:14px;line-height:19px;}
#email-subscribe input.submit {background:#4dbfd9;color:#fff;margin-top:20px;font-size:14px;font-weight:300;cursor:pointer;transition:all .3s;}
#email-subscribe input.submit:hover {background:#fff;color:#4dbfd9!important}
 #email-subscribe input::-webkit-input-placeholder { 
   color: #fff;
  
}
<div class="email-subscribe" id="email-subscribe">
<h4 class="title">Receba Atualizações<br /> <span>EM SEU EMAIL</span></h4>
<form action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=blogspot/vYnG', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true" _lpchecked="1">
<input class="email-field" type="text" value="" placeholder="digite seu e-mail aqui" name="email" />
<input type="hidden" value="blogspot/vYnG" name="uri" /><input type="hidden" name="loc" value="pt_BR" />
<input class="submit" name="submit" type="submit" value="Cadastre-se agora" />
</form>
<div class="clear"></div></div>

  • I don’t understand why the negative... seems to work...

  • Here is a reference http://tableless.com.br/stylesr-e-formatr-placeholder-inputs/

  • I did that and there was a little bug that was creating a margin automatically. I was able to solve the problem like this: #email-subscribe input.email-field, #email-subscribe input::-Webkit-input-placeholder{color:#fff;margin-top:0px;} Muuito thanks friend <3 xeruh kkjj

  • now I would like to know how I do so that when I click on the box, the name "Type your email here" disappears, and when clicked on something else outside the box, the words go back to place.

0

I think what you want is to change the color of the placeholder, with color: #fff; in the placeholder should resolve

Browser other questions tagged

You are not signed in. Login or sign up in order to post.