Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the height of an input (text) field in CSS?

Sorry for this question but I can't seem to find an answer anywhere. I have CSS code that should set the height of my text box. I am using VS2010 Express for Windows phone, coding in HTML/CSS/Javascript/C#.

HTML

<input class="heighttext" type="text" id="name"> 

CSS

.heighttext{   height:30px } 

I can set the height to anything I like, but the text box will stay the same! Please help, or at least send me a link that can!

like image 574
Arrie Avatar asked Oct 15 '12 09:10

Arrie


1 Answers

Try with padding and line-height -

input[type="text"]{ padding: 20px 10px; line-height: 28px; } 
like image 127
Dipak Avatar answered Sep 29 '22 13:09

Dipak