Connecting Tech Pros Worldwide Forums | Help | Site Map

Legend Tag

jcage@lycos.com
Guest
 
Posts: n/a
#1: Oct 22 '08
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>

Jonathan N. Little
Guest
 
Posts: n/a
#2: Oct 22 '08

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
jcage@lycos.com
Guest
 
Posts: n/a
#3: Oct 22 '08

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.
Jonathan N. Little
Guest
 
Posts: n/a
#4: Oct 22 '08

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
Jukka K. Korpela
Guest
 
Posts: n/a
#5: Oct 22 '08

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/

Nik Coughlin
Guest
 
Posts: n/a
#6: Oct 22 '08

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