DesignFestival: Position Text Labels on Forms Using CSS

Tweet

In this post, I’ll explain three common approaches to positioning text labels on web forms using CSS: top-positioned text labels left-aligned text labels right-aligned text labels Using Top-positioned Text Labels Positioning labels at the top of their form elements is probably the easiest layout to achieve, as we only need to tell the label to take up the entire width of its parent element. As our form elements/labels are inside ordered list items (which are block elements), each pair will naturally fall onto a new line, as you can see from Figure 9. All we have to do is get the form elements and labels onto different lines.

Follow this link:
DesignFestival: Position Text Labels on Forms Using CSS

Free JavaScript: Novice to Ninja Sample

Get a free 32-page chapter of JavaScript: Novice to Ninja and receive updates on exclusive offers from SitePoint.

No Reader comments