The "ui-field-contain" class style labels and form controls properly based upon the width of the page. When the width of the page is greater than 480px, it automatically place the label on the same line as the form control.
When the page is less than 480px, the label will be placed above the form element, and a thin bottom border will be added below the form element. Try to resize the width of the window to see the effect.