I have the following textbox in my HTML
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.
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.
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 :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With