WebAIM - Web Accessibility In Mind

E-mail List Archives

RE: RE: How to associate form elements with table cells?

for

From: Cook, Graham R
Date: May 29, 2005 8:16PM


Why use a table? I would tend to do something like this:

<style>
.book{width:10em; float:left;}
.price{width:5em; float:left;text-align:right;}
</style>
<label><div class="book">Book A</div><div class="price">
$2.00</div><input type="text" size="4" title="Enter quantity"></label>

Note: I also put the price before the textbox as you can then associate
both the book and price, I also think it looks better on screen having
the input at the end of a line.

Regards

Graham Cook