1

In the input box of my website the text of the page is an increased size, however, the text submitted in a textbox is a different size.

<input type="text" name="number">

How would I go about increasing the size of the text typed in to ?px?

  • What CSS have you tried? – Drakes Jun 23 '15 at 05:09
  • 1
    possible duplicate of [How to change the font and font size of an HTML input tag?](http://stackoverflow.com/questions/8083430/how-to-change-the-font-and-font-size-of-an-html-input-tag) – aadarshsg Jun 23 '15 at 05:10
  • possible duplicate of [How to change font size in a textbox in html](http://stackoverflow.com/questions/2117290/how-to-change-font-size-in-a-textbox-in-html) – Rohit Azad Malik Jun 23 '15 at 05:13

1 Answers1

0

 input[type="text"]{
   font-size:24px;
 }
<input type="text" name="number" value="123"/>
<input type="text" name="number" value="123" style="font-size:12px"/>

If you wish to change the size of the font for all the inputs altogether, you can add this into your header part:

<style>
 input[type="text"]
 {
   font-size:24px;
 }
</style>

if you wish to change the font size for a specific input field, you can use:

<input style="font-size:25px" type="text" name="number"/>

in addition, if it is a number you are planning on being typed into this field you might want to use type="number". read more about it here

Noam Smadja
  • 915
  • 2
  • 8
  • 29
  • Thank you! This worked, when I was setting it in the CSS it was doing nothing. – Evan Williams Jun 23 '15 at 05:25
  • @EvanWilliams I've added a code snippet so you can play with it. Maybe an other CSS command from a style sheet file is overriding yours. Note: It is customary to upvote answers you find useful, and to accept answers on questions you posed if they have solved your answer – Noam Smadja Jun 23 '15 at 05:29