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

new to HTML: need help creating 4 digit input fields

is this possible in roll 20? i'm making a homebrew game sheet with roll20 and my hitpoint fields need to be 4 digits to see the whole number. is there any way to make it go past the default 3 digit input box?
bump
1401713990
Actoba
Pro
Sheet Author
Just set the width of the input field...either inline or via CSS
style='width:##px;' or in the css file: .class { width:##px; }
thanks for the reply! sorry. i've been doing html for about a day lol.
erik b. said: bump Threads autolock in two months, so there was no danger of this thread autolocking yet ;) Josiah B. said: style='width:##px;' or in the css file: .class { width:##px; } Consider using em units, it's relative to the font used. More info on CSS units.
Aki - does that mean "width:4em; " would give the correct '4-digit' display?
hmm thanks :D i'll try the em
dont get confused with px width and digits, px is pixel width. You dont set an input to be 4 digits. It will just truncate and you wont see the extra digits. so play with the width until you get an input that matches your requirements.
i messed around with px and em and found em works better. although it's not an exact match. an em of 5-7 shows 4 digit numbers good. and an em of 12 on text makes it looks real nice. thanks a lot for the advice. like i said, i've been doing HTML for about 2 days :D
1401790601
Actoba
Pro
Sheet Author
em is a variable unit that is tied to the font you are using. So if you change the font size (or the browser does) then anything sized with em will also be scaled up or down too. px is a fixed unit that wont change regardless. So something you set with a px size will always stay the same size regardless of any other changes
That's good to know. thank's for all the information and advice.