18

Can I reduce the textbox width without using classes?

<input type="text" maxlength="5" style="3px"/>
Faruz
  • 9,909
  • 10
  • 48
  • 66
svk
  • 4,513
  • 18
  • 63
  • 100

4 Answers4

44
<input type="text" style="width:50px;"/>
warren
  • 32,620
  • 21
  • 85
  • 124
Faruz
  • 9,909
  • 10
  • 48
  • 66
4

Is not nice to define textbox width without using CSS, be warned ;-)

<input type="text" name="d" value="4" size="4" />
blagus
  • 2,086
  • 4
  • 19
  • 22
0

rows and cols are required attributes, so you should have them whether you really need them or not. They set the number of rows and number of columns respectively.

http://htmldog.com/reference/htmltags/textarea/

Jeffrey Aylesworth
  • 8,242
  • 9
  • 40
  • 57
-1
<input type='text' 
       name='t1'
       id='t1'
       maxlength=10
       placeholder='typing some text' >
<p></p>

This is the text box, it has a fixed length of 10 characters, and if you can try but this text box does not contain maximum length 10 character

John Willemse
  • 6,608
  • 7
  • 31
  • 45
lalit
  • 1
  • 1