Vertically aligning form elements?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Casimir

    Vertically aligning form elements?

    What would be the correct way to align checkboxes and their labels, in
    your opinion?

    For example

    ....
    <td>
    <input type="checkbox" class="cbox" name="thisCheck " />
    <label for="thisCheck" >Check this if you want a copy</label><br/>
    </td>
    ....

    I am having a hard time with this. Firefox seems to ignore
    vertical-align for labels and checkboxes. IE seems to vertically
    transpose labels, and Opera doesnt do anything.

    Any help appreciated.

    Casimir Pohjanraito
  • David Stone

    #2
    Re: Vertically aligning form elements?

    In article <Tz2Lj.323533$f i.10954@reader1 .news.saunalaht i.fi>,
    Casimir <pikEISPAMMMsel i@welho.comwrot e:
    What would be the correct way to align checkboxes and their labels, in
    your opinion?
    >
    For example
    >
    ...
    <td>
    <input type="checkbox" class="cbox" name="thisCheck " />
    <label for="thisCheck" >Check this if you want a copy</label><br/>
    </td>
    ...
    >
    I am having a hard time with this. Firefox seems to ignore
    vertical-align for labels and checkboxes. IE seems to vertically
    transpose labels, and Opera doesnt do anything.
    >
    You don't provide a url which would allow anyone to check the
    CSS for "cbox" or what else you are doing with your table, so
    you are unlikely to get many comments on your code.

    However, FireFox does not implement CSS alignment properties down
    columns - this is a ~10-year old bug (#915) which you can view
    at https://bugzilla.mozilla.org/show_bug.cgi?id=915

    Otherwise, google this group for vertical alignment of form
    elements - it's come up many times!

    Comment

    • Casimir

      #3
      Re: Vertically aligning form elements?

      I guess I was looking for the generic all-encompassing solution for a
      generic form-building problem.

      Perhaps such doesnt exists due to poor browser support. Or perhaps such
      a solution isn't known to you.

      Generally I usually have to try many things before I get checkboxes to
      line up with labels.

      Fiddling with vert-align percentages, enclosing elements in divs and
      funky margin-padding tweaks just take too much time, and have me
      pondering if CSS is really all that good a technology at all.

      Comment

      Working...