Legend Tag

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'm trying to line up two columns in a form using html check boxes but
haven't been successful in aligning the right side.  Left side is easy
enough but I can't get the right side to align within the legend tag.
Anyone have any ideas?  I've tried using a table but that places the
right hand side outside of the legend tag, though does a good job of
alignment.  Thanks, John

//desired left side:
<fieldset style="text-align:left;">
<input type="checkbox" />Peanuts <br />
<input type="checkbox" />Popcorn <br />
<input type="checkbox" />Corn on the cob. <br />

//desired right side:
<input type="checkbox" />Apples <br />
<input type="checkbox" />Oranges and Pears <br />
<input type="checkbox" />Bananas <br />

Re: Legend Tag

jcage@lycos.com wrote:

Quoted text here. Click to load it

Stop trying that.

For clarity, usability, and accessibility, put one field together with its
label on one line. End of story. End of problems.

Quoted text here. Click to load it

This is more logical and more accessible:

<div><input type="checkbox" id="peanuts" ...> <label

Check your favorite HTML tutorial for info on <label>. If there's no such
info on it, restart learning HTML from a better tutorial.

Yucca, http://www.cs.tut.fi/~jkorpela/

Re: Legend Tag

Quoted text here. Click to load it

The problem is that you're misusing the legend tag.  I have included some
example markup to show you how it should be used:

<legend>Chuck Norris</legend>

Site Timeline