Sexy dynamic formatting

What you'll be learning:

  • How to apply dynamic, context-dependent styles to form controls

  • How to control the width of columns in a table control

  • How to use the headless="true" attribute to align controls horizontally

Even the basic styling options that you saw in the previous tutorial can make a form easy on the eyes, but the best formatting helps the user in some way. The techniques you'll pick up in this section all make the job of using the forms you apply them to easier.

Alternate row colors and varying column widths guide the user's eyes and help make sense of tables, highlighting a selected option provides feedback and helps prevent errors, and the rationale behind aligning elements that belong together is kind of obvious.

This is what you'll be getting into below.