Superunknown Superunknown - 1 year ago 88
HTML Question

Can't enter text in a textarea

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">
<input name="name" placeholder="Type Here">
<input name="email" type="email" placeholder="Type Here">

//this is the problem
<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">

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;


Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download