2
I have a form with the following HTML:
<div class="cont960 trabalheConosco">
<form>
<input type="text" placeholder="nome*" />
<input type="text" placeholder="e-mail*" />
<input type="text" placeholder="Telefone" />
</form>
</div>
THE CSS:
.trabalheConosco input, div .trabalheConoscoAnexo {
width: 480px;
padding: 17px;
box-sizing: border-box;
display: block;
background-color: #e9e9e9;
margin-bottom: 8px;
font: 300 italic 18px/18px "Lato";
color: #898989!important;
}
The Jquery:
function add() {if($(this).val() == ''){$(this).val($(this).attr('placeholder')).addClass('placeholder');}}
function remove() {if($(this).val() == $(this).attr('placeholder')){$(this).val('').removeClass('placeholder');}}
if (!('placeholder' in $('<input>')[0])) {
$('input[placeholder], textarea[placeholder]').blur(add).focus(remove).each(add);
$('form').submit(function(){$(this).find('input[placeholder], textarea[placeholder]').each(remove);});
}
What happens is that the word inside the input
is not correctly accepting the color of the font I informed, in case color: #898989! Import;. I wonder if it has how I inform font color for placeholder containing on input
.
Something like this example:
.trabalheConosco input[placeholder] {
color: #898989;
}
Type
.trabalheConosco::-webkit-input-placeholder{blablabla}
?– Felipe Viero Goulart
I adapted the answer to your example.
– Franchesco
Ball show but this is general right? would like to have a color in a
placeholder
specific.– Felipe Viero Goulart
Just specify the specific input class or id. I modified the response...
– Franchesco