1

I have input type TEXT in my form, i want to reduce the HEIGHT, i have tried many things, but seems like whatever I do it does not work, I tried with line-height, margin etc. below is something i have.

  .txtboxItem{
    height: 1em;
    font-size:8px;
    }

and here is my markup

<input class="txtboxItem" type="text" id="txt_emailAddress" />

please note, width works fine, font looks small in my textbox, but why height of textbox is NOT reducing?

EDIT: I think my external file has input property with "!", anyway I can override it in my local html file?

highwingers
  • 1,649
  • 4
  • 21
  • 39

2 Answers2

2

Its working for me using px...

input{height:5px;}

http://jsfiddle.net/mvNDh/

edit: I've used your code and its working in the same jsfiddle... http://jsfiddle.net/mvNDh/

tintyethan
  • 1,772
  • 3
  • 20
  • 44
0

Use px instead of em, as em in most browsers is generally equal to about 16px unless the user has changed their default value.

height:8px;

Try remove any padding or margins

margin:0px;
padding:0px;
Aidan
  • 757
  • 3
  • 13
  • it works just fine in fiddle, but in my web application textbox goes UP in height just fine, however it would not go down in height. – highwingers Mar 25 '14 at 01:41
  • You could try see if there is any padding and remove it. Note my updates – Aidan Mar 25 '14 at 01:44