Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Auto-sizing input

1484514070
Kryx
Pro
Sheet Author
API Scripter
I remember reading a thread here a week or two ago about an input that changes size based on its content. Normally this is impossible with JS, but someone figured it out within roll20. Does anyone have a link?
1484515863
Lithl
Pro
Sheet Author
API Scripter
I remember seeing the same thread. IIRC, it leveraged the ability to use attributes as the text of a non-form element. Something along the lines of: <div> <input name="attr_example"> <span name="attr_example"></span> </div> div { position: relative; } input { position: absolute; top: 0; right: 0; bottom: 0; left: 0; opacity: 0; } span { display: block; } The above is completely untested, and probably won't work as-is. But maybe you can use it as a starting point. =)
1484518276
Kryx
Pro
Sheet Author
API Scripter
that is some dirty hackery.. haha. Oh boy... hmmm
1484519696
Finderski
Pro
Sheet Author
Compendium Curator
There are two in the CSS Wizardry thread: The first:&nbsp; <a href="https://app.roll20.net/forum/permalink/4316449/" rel="nofollow">https://app.roll20.net/forum/permalink/4316449/</a> The second:&nbsp; <a href="https://app.roll20.net/forum/permalink/4499340/" rel="nofollow">https://app.roll20.net/forum/permalink/4499340/</a> The second is based on the first, but has some slight modifications...
1484521779
Kryx
Pro
Sheet Author
API Scripter
Thanks Finderski