Reputation: 501
I cannot enter text in the message section. It will not let me click and type. The name, email and anti-spam sections work fine, only the textarea doesn't. I've googled and found no solution in regards to HTML textarea tag.
<form method="post" action="email.php">
<label>Name</label>
<input name="name" placeholder="Type Here">
<label>Email</label>
<input name="email" type="email" placeholder="Type Here">
//this is the problem
<label>Message</label>
<textarea name="message" placeholder="Type Here"></textarea>
<label>*What is 2+2? (Anti-spam)</label>
<input name="human" placeholder="Type Here">
<input id="submit" name="submit" type="submit" value="Submit">
</form>
This is my CSS:
.contact-form input[type=text],
.contact-form input[type=password],
.contact-form input[type=email],
.contact-form textarea,
.contact-form input[type=file] {
display: inline-block;
float: left;
padding: 12px 15px;
width: 100%;
border: 0;
border: 1px #DFDFDF solid;
background: #fff;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
-webkit-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.contact-form textarea {
clear: both;
width: 100%;
height: 180px;
resize: none;
}
Upvotes: 7
Views: 18284
Reputation: 2495
You have:
button, input, optgroup, select, textarea {
color: inherit;
font: inherit;
margin: 0px;
}
The problem is font: inherit;
which use line-height: 0px
from form
element. So set line-height: 1.2em
to textarea
or other value as you wish.
Upvotes: 9