set input width to content css code example Example: input text size css input[type="text"] { font-size:24px; }