Aligning Labels


/ Published in: CSS
Save to your folder(s)

Alignment of labels with their relevant inputs can be a horrible task to achieve in older browsers. This snippets solves that for us by making it consistent across browsers!


Copy this code and paste it in your HTML
  1. /* align checkboxes, radios, text inputs with their label */
  2. input[type="radio"] { vertical-align: text-bottom; }
  3. input[type="checkbox"] { vertical-align: bottom; *vertical-align: baseline; }
  4. .ie6 input { vertical-align: text-bottom; }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.