views:

177

answers:

2

Whether I can reduce the textbox width without using classes?

<input type="text" maxlength="5" style="3px"/>
+3  A: 
<input type="text" style="width:50px;"/>
Faruz
I already tried it .It doesnt work
vinothkumar
Oh but it does.<input type="text" style="width:50px;"/>if it doesn't, maybe you have some class that overrides it. Try:<input type="text" style="width:50px!important;"/>and if not:Use FireBug or IE Developer toolbar to figure out what's causing the width to grow.
Faruz
+1  A: 

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
Thought that was only for textareas
Faruz
I asked for textbox... not textarea...
vinothkumar