HTML Form How to - Set width for file input








Question

We would like to know how to set width for file input.

Answer


<!--from ww w  .  ja  v  a2 s . com-->
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
input[type=file] {
  width: 85px;
}
</style>
</head>
<body>
  <input type='file' title="Choose a video please">
</body>
</html>

The code above is rendered as follows: