Connecting Tech Pros Worldwide Help | Site Map

Legend Tag

  #1  
Old October 22nd, 2008, 03:25 AM
jcage@lycos.com
Guest
 
Posts: n/a
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;">
<legend><b>Type</b></legend>
<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 />
</fieldset>
  #2  
Old October 22nd, 2008, 05:15 AM
Jonathan N. Little
Guest
 
Posts: n/a

re: Legend Tag


jcage@lycos.com wrote:
Quote:
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;">
<legend><b>Type</b></legend>
<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 />
</fieldset>
You mean within the fieldset...right?

<fieldset>
<legend><b>Type</b></legend>
<div style="float: left">
<input type="checkbox" />Peanuts <br />
<input type="checkbox" />Popcorn <br />
<input type="checkbox" />Corn on the cob.
</div>

<input type="checkbox" />Apples <br />
<input type="checkbox" />Oranges and Pears <br />
<input type="checkbox" />Bananas <br />
</fieldset>


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
  #3  
Old October 22nd, 2008, 10:15 AM
jcage@lycos.com
Guest
 
Posts: n/a

re: Legend Tag


On Oct 21, 9:12*pm, "Jonathan N. Little" <lws4...@central.netwrote:
Quote:
jc...@lycos.com wrote:
Quote:
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
>
Quote:
//desired left side:
<fieldset style="text-align:left;">
<legend><b>Type</b></legend>
<input type="checkbox" />Peanuts <br />
<input type="checkbox" />Popcorn <br />
<input type="checkbox" />Corn on the cob. <br />
>
Quote:
//desired right side:
<input type="checkbox" />Apples <br />
<input type="checkbox" />Oranges and Pears <br />
<input type="checkbox" />Bananas <br />
</fieldset>
>
You mean within the fieldset...right?
Correct - actually the title of the thread should have been
'fieldset'. :-) I'm trying to have left side and right side check
boxes and am having a difficult time in getting good alignment of the
right hand check boxes with the script above so am hopeful that
there's a trick I can use to accomplish this while keeping all 6 check
boxes in the same fieldset.
  #4  
Old October 22nd, 2008, 02:35 PM
Jonathan N. Little
Guest
 
Posts: n/a

re: Legend Tag


jcage@lycos.com wrote:
Quote:
On Oct 21, 9:12 pm, "Jonathan N. Little" <lws4...@central.netwrote:
Quote:
>jc...@lycos.com wrote:
Quote:
>>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;">
>><legend><b>Type</b></legend>
>><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 />
>></fieldset>
>You mean within the fieldset...right?
>
Correct - actually the title of the thread should have been
'fieldset'. :-) I'm trying to have left side and right side check
boxes and am having a difficult time in getting good alignment of the
right hand check boxes with the script above so am hopeful that
there's a trick I can use to accomplish this while keeping all 6 check
boxes in the same fieldset.
I gave you a s<fieldset>
<legend><b>Type</b></legend>
<div style="float: left">
<input type="checkbox" />Peanuts <br />
<input type="checkbox" />Popcorn <br />
<input type="checkbox" />Corn on the cob.
</div>

<input type="checkbox" />Apples <br />
<input type="checkbox" />Oranges and Pears <br />
<input type="checkbox" />Bananas <br />
</fieldsetolution:




--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
  #5  
Old October 22nd, 2008, 08:15 PM
Jukka K. Korpela
Guest
 
Posts: n/a

re: Legend Tag


jcage@lycos.com wrote:
Quote:
I'm trying to line up two columns in a form using html check boxes
Stop trying that.

For clarity, usability, and accessibility, put one field together with its
label on one line. End of story. End of problems.
Quote:
<input type="checkbox" />Peanuts <br />
This is more logical and more accessible:

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

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/

  #6  
Old October 22nd, 2008, 09:55 PM
Nik Coughlin
Guest
 
Posts: n/a

re: Legend Tag


<jcage@lycos.comwrote in message
news:b5083f82-2ec0-4ae5-b50e-5d30c3c81676@b31g2000prf.googlegroups.com...
Quote:
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;">
<legend><b>Type</b></legend>
<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 />
</fieldset>
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>

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to break long legend tag caption into multiple lines? dubing@gmail.com answers 5 February 24th, 2007 02:05 AM
Use of <fieldset>/<legend> in Tables Adam Smith answers 4 January 12th, 2006 04:15 PM
dynamic list on mozilla overlaps <span> tag as it grows hsomob1999@yahoo.com answers 6 July 23rd, 2005 08:01 PM
Using <fieldset>/<legend> without forms Ian Rastall answers 14 July 20th, 2005 06:35 PM