Go Back   HTMLCenter Web Development Forums > Web Design and Development > Usability and Accessability

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 06-08-2007, 02:03 PM
Registered User
 
Join Date: Jun 2007
Posts: 1
<label> matricies of fields...

So far all of the tutorials on using <label> focus on one specific scenario (ie. you have exactly one label for each field). How would you code for a table with the following structure (the numbers are text input fields):

Code:
                                                First Year    After Deferral
        Amount of Farm Operating Expenses:          500.00           2500.00
Amount of Farm Operating Interest Expense:           75.00            175.00
      Amount of Owner Withdrawals Expense:          200.00            150.00
I have a mandate to pass section 508 compliance testing, however I am at a loss as to how I can provide a <label> for each field when it's a combination of the column header and the row header together that describes the information in the field.

Any help would be appreciated.
Reply With Quote

  #2 (permalink)  
Old 06-08-2007, 06:51 PM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,363
That's an extremely intriguing question. I'm not sure if there is an official answer or not.

However, here is a suggestion on how I would handle a situation like this:
Generate a unique label for each and every text input field. Do not use the row header as a label for anything. Then, make a CSS selector that looks something like:
Code:
table tr td label {
display: none;
}
I'll try to do a little more research to see if there is a better solution or not.
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote
  #3 (permalink)  
Old 06-30-2007, 01:21 AM
happycoder's Avatar
Registered User
 
Join Date: Jun 2007
Posts: 4
Label and Table

I've never tried using <label> for a table. Interesting. I suppose you can try something like this:

'------------------------- HTML CODE
Code:
<ol>
<li>
  <label class="col1"></label>
  <label class="col2"></label>
  <label class="col3"></label>
</li>
<li>
  <label class="col1"></label>
  <label class="col2"></label>
  <label class="col3"></label>
</li>
</ol>

'------------------------- CSS CODE
Code:
ol {
  list-style: none;
}

li {
  float: left;
  display: inline;
}

li label .col1 {
  text-align: right;
  width: 20em;
}

li label .col2 {
  text-align: right;
  width: 10em;
}

li label .col3 {
  text-align: right;
}

Last edited by happycoder : 06-30-2007 at 01:24 AM.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to store checkbox values in hidden fields gilgalbiblewhee Programming and Scripting 2 06-07-2007 02:54 PM
Form fields cswallow Programming and Scripting 1 08-03-2006 11:41 AM
Fields won't add. NevadaSam Programming and Scripting 2 04-30-2006 02:25 PM
Really Hidden Form Fields curtiss Programming and Scripting 3 08-15-2005 04:26 PM
Why oh why do my ASP fields turn yellow when Live?? vibejunkie Programming and Scripting 1 05-04-2005 03:56 PM


All times are GMT -5. The time now is 09:58 AM.

 
KickApps
Clicky Web Analytics


Subscribe to our feed | add to myYahoo!

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
© 1997-2007 HTMLCenter