HighDots Forums  

Vertically aligning form elements?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Vertically aligning form elements? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Casimir
 
Posts: n/a

Default Vertically aligning form elements? - 04-09-2008 , 07:24 AM






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

Reply With Quote
  #2  
Old   
David Stone
 
Posts: n/a

Default Re: Vertically aligning form elements? - 04-09-2008 , 10:06 AM






In article <Tz2Lj.323533$fi.10954 (AT) reader1 (DOT) news.saunalahti.fi>,
Casimir <pikEISPAMMMseli (AT) welho (DOT) com> wrote:

Quote:
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!


Reply With Quote
  #3  
Old   
Casimir
 
Posts: n/a

Default Re: Vertically aligning form elements? - 04-11-2008 , 03:07 AM



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.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.