Example 2: File control with label encapsulating form control

Best Practice Rating: Poor

Example Start

Example End

HTML Source Code

<div class="file">
    <label>Up load file <br/>
    <input type="file" name="name" />
    </label>
</div>

CSS Source Code

  <style type="text/css">
div.file label {
  margin: 0;
  padding: 0;
  margin-left: 20px;
  display: block;
  font-size: 100%;
  margin-bottom: 1.25em;
}

div.file input {
  margin: 0;
  padding: 0;
}
  </style>