.input {
  display: inline-block;
}
.input span {
  position: absolute;
  z-index: 1;
  cursor: text;
  pointer-events: none;
  color: #999;
  /* Input padding + input border */
  padding: 7px;
  /* Firefox does not respond well to different line heights. Use padding instead. */
  line-height: 12px;
  /* This gives a little gap between the cursor and the label */
  margin-left: 2px;
}
.input input, .input textarea, .input select {
  z-index: 0;
  padding: 2px;
  margin: 0;
  font: inherit;
  line-height: 12px;
}
.input select {
  padding: 5px;
  /* Unfortunately selects don't respond well to padding. They need an explicit height. */
  height: 31px;
}