I searched and searched, but could not understand it correctly. I have a text box on my site, and in my CSS / HTML I defined its class, like everything else, and gave it a background image without any problems. I decided that I needed to change the font color, but no matter what I do, it just doesn't work. My CSS text box:
.tb1 { background-color :
... this does not seem to work.
I read another answer to a similar question that was pointed out using
onfocus="this.value=''
which did nothing, then I tried, placeholder:
<input name="username" type="text" class="tb1" maxlength="24" placeholder="Username"/>
and this kind of work. It places the blue "Username" in the text box. but I have to remove it in order to start printing, And when you print, it still comes out in black, not a specific color.
This is an HTML form:
<div id="login" class="login"><center> <form action="login.php" method="post"> Username:<br><input name="username" type="text" class="tb1" placeholder="Username"<br/> Password:<br><input class ="tb1" type="password" name="password" placeholder="Password"/><br /> <input class="tb1" type="submit" name="login" value="Login"/> </form></center> </div>
So what will change the color of my text box? and / or clear it when you click on it so that the "Username" or "Password" is cleared, and you can enter your information without deleting it yourself before entering? ... oh and the submit button too
html css text textbox
Rob hopper
source share