Reputation:
I am making a simple forms in html. The background is black so I want the typing text in white.
Here is what I have so far:
<form method="GET">
<input type="text" name="name" placeholder="Full Name"><br/>
<input type="submit">
</form>
I highlight the typing text in the picture "asdasd" I want the user can type their text in color white. I've tried
color: #ffffff;
in CSS, but it does not works.
Any help would appreciated.
Upvotes: 3
Views: 12498
Reputation: 11
Try something like this?
input[type=text] {
background-color: #3CBC8D;
color: white;
}
Upvotes: 0
Reputation: 305
You should be able to fix this by doing this:
<input type="text" name="name" placeholder="Full Name" style="color:white;">
For a neater look, you could also do this:
<input type="text" name="name" placeholder="Full Name">
input {
color:white;
}
Or, if you only want to apply the white text to one input, you could do this:
<input type="text" name="name" placeholder="Full Name" id="input1">
#input1 {
color:white;
}
If you want to make the placeholder the same color, or a similar color, use the solution by @Çağrı.
Upvotes: 3
Reputation: 17610
In css u should change both color of input and placeholder of input to white.
input[type=text],input[type=text]::placeholder{
color:white;
}
Upvotes: 1