text area not growing in height when text is entered.
https://codepen.io/avinash-tallapaneni/pen/MWPyvQe
i gave min-height:8rem and height: auto. when i enter text its not growing in height instead im getting scroll. how to fix this?
22 Replies
Hi. You are using a textarea to type into. I don’t think that, with CSS alone, it is possible to get it to automatically expand to fit its contents. You may need to look at a JavaScript solution.
If you want the text area to grow automatically without resorting to JavaScript I would suggest using the
contenteditable
attribute on a div
.
Also, instead of forcing a div
to be a modal, you should be using the dialog
element instead. It's a native HTML element designed specifically to do just thati tried that. the issue is i need to offset the placeholder text when text is entered .. i didnt find resource online on how its done so i used textarea
What do you mean by "offset the placeholder"?
i found diff way to offset the label..
i originally had data-placeholder: text in div. so i used css if empty show the content before using content:attr(data-placeholder). so i wanted to move the placeholder text when text is entered. i couldnt fig it out so i used text area.
now i just used label gave abs position to the contenteditable div and if div has text this label is being offset by y direction probably rambled a bunch of thing. my head is spinning for figuring things out
thus type of linking is new to discord right??
i assume it's only for pc now.. doesn't seem to be working on laptop nor mobile
It's only out to a few random servers. We have it here but it's not everywhere
YouTube link
Yep, posted that on mobile and it works fine
BOOM!
lol
Micdrop :p
tnx
xD
it's weird how it's not on many server's
#head
The important thing is to have the
https
in the link. If there's no http
/https
discord doesn't recognize it as a URLthis was supposed to make text h1
You forgot the space
# head
head
head
aah lol
it's weird
We're getting way off-topic, though. If you want to play around with the new syntax feel free to use #off-topic or make a thread in #general
ya sure