Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Html textarea is not clickable and unable to type text in it

Tags:

html

css

textarea

I have the following textbox in my HTML

textbox

I have the following code:

.contact-us-form textarea, .contact-us-form input[type="text"], .contact-us-form input[type="email"] {
    height: 40px;
    padding: 0;
    margin: 0;
    line-height: 0;
    padding-left: 15px;
    color: #333;
    width: 100%;
    border: none;
    border-bottom: 1px #BFB9B9 solid;
    padding-left: 40px;
}

.contact-us-form textarea {
    height: 100px;
    padding-top: 20px;
}
<textarea name="" placeholder="Message *"></textarea>

For some reason i am unable to get the cursor inside the textarea and i am unable to type text inside it too. Why is this happening ? I don't have any JS attached to this textbox, i have debugged and tested this, also i have checked all the computed css properties and i don't seem to find what exactly is causing this problem.

Can anyone point me to what exactly i am doing wrong ?

My site link.

like image 949
Alexander Solonik Avatar asked Oct 20 '25 09:10

Alexander Solonik


2 Answers

Please try this code. It's due to line-height: 0; style if you set line-height:initial; or you set any px to this property then it will work as normal.

Instead of:

.contact-us-form textarea, .contact-us-form input[type="text"], .contact-us-form input[type="email"] {
    line-height: 0;        
}

Should of:

.contact-us-form textarea, .contact-us-form input[type="text"], .contact-us-form input[type="email"] {
    line-height: initial;        
}

Hope this helps.

like image 173
Emipro Technologies Pvt. Ltd. Avatar answered Oct 22 '25 00:10

Emipro Technologies Pvt. Ltd.


Ok. I tested and found issue here.. On focus textarea getting line height: 0px.

See attached screenshot link here

Rest you know how to solve this :)

like image 28
Munish Kumar Avatar answered Oct 21 '25 23:10

Munish Kumar