Error in RWD code

· 1 min read

from: Sams Teach Yourself Responsive Web Design in 24 Hours

In LISTING 18.3 “CSS for a Responsive Form” (page 257) I include a position for the label of an input box to hide it from view. But the position values I used would cause the browser to create massive scrollbars both vertical and horizontal.

The incorrect CSS is:

label.inputbox {
  position: absolute;
  top: 9999px;
  left: 9999px;
}

This is easily corrected by positioning the top and left styles negative 9999px each.

label.inputbox {
  position: absolute;
  top: -9999px;
  left: -9999px;
}