By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,905 Members | 879 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,905 IT Pros & Developers. It's quick & easy.

Fieldset height

P: n/a
Hello,

I have a <fieldset> in a <TD>. I want the fieldset to be as high as
the TD.

Setting the fieldset's height to 100% works in IE. Opera ignores it.
Firefox & Netscape 7.1 give it the height of the whole page. Any
suggestions? Here is my code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Test 1 2 3 </TITLE>

<style type="text/css">

td
{
vertical-align : top;
}
</style>

</HEAD>

<BODY>

<div class="header">
<h1>Fieldset Test</h1>
</div>

<div>

<table style="width:100%;">
<tr>
<td style="width:50%; height:100%;">
<fieldset style="height:100%">
<legend>Date</legend>
<label for="date">Date</label>
<input type="text" id="date" name="date"/>
<br />

<br />
<label for="timehour">Time (hh:mm)</label>
<select name="timehour" id="timehour">
<option value="" selected>
<option value="0">00
<option value="1">01
<option value="2">02
<option value="23">23
</select>
:
<select name="timemin" id="timemin">
<option value="" selected>
<option value="0">00
<option value="1">01
<option value="2">02
<option value="59">59
</select>

</fieldset>

</td>
<td style="width:50%">
<fieldset>
<legend>Location</legend>

<label for="street">Street Name</label>
<input type="text" id="street" name="street"/>

<br />
<label for="hwy">Highway #</label>
<input type="text" id="hwy" name="hwy"/>

<br />
<label for="city">City</label>
<input type="text" id="city" name="city"/>

<br />
<label for="sector">Sector</label>
<input type="text" id="sector" name="sector"/>

<br />
<label for="state">State</label>
<input type="text" id="state" name="state"/>
</fieldset>
</td>
</tr>
</table>

</div>
</body>
</html>
Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
In article <22**************************@posting.google.com >,
sp*******@marx7.org (Trent) wrote:
I have a <fieldset> in a <TD>. I want the fieldset to be as high as
the TD.


Setting the TD as high as the FIELDSET will solve your problem. You
won't have to do anything for that, as a matter of fact.

Though, I find it an odd thing, to have a FIELDSET inside a TABLE. There
are cases in which authors choose to layout parts of a form using a
table, but then they use the FIELDSET markup outside of the table.

Are you sure you need a table in the first place?

--
Kris
<kr*******@xs4all.netherlands> (nl)
<http://www.cinnamon.nl/>
Jul 20 '05 #2

P: n/a
Kris <kr*******@xs4all.netherlands> wrote in message news:<kr*****************************@news1.news.x s4all.nl>...
In article <22**************************@posting.google.com >,
sp*******@marx7.org (Trent) wrote:
I have a <fieldset> in a <TD>. I want the fieldset to be as high as
the TD.


Setting the TD as high as the FIELDSET will solve your problem. You
won't have to do anything for that, as a matter of fact.

Though, I find it an odd thing, to have a FIELDSET inside a TABLE. There
are cases in which authors choose to layout parts of a form using a
table, but then they use the FIELDSET markup outside of the table.

Are you sure you need a table in the first place?


Hello,

The only reason I'm using a table is because I'd like to have 2
fieldsets next to each other on the same line. This works by putting
them each in a <td>.

Re: setting the TD as high as the fieldset: what about when I have two
TD's next to each other with different sized fieldsets in them? All I
want is the smaller fieldset to fill up the TD.
Jul 20 '05 #3

P: n/a
In article <22**************************@posting.google.com >,
sp*******@marx7.org (Trent) wrote:
I have a <fieldset> in a <TD>. I want the fieldset to be as high as
the TD.
Are you sure you need a table in the first place?
The only reason I'm using a table is because I'd like to have 2
fieldsets next to each other on the same line. This works by putting
them each in a <td>.

Re: setting the TD as high as the fieldset: what about when I have two
TD's next to each other with different sized fieldsets in them? All I
want is the smaller fieldset to fill up the TD.


Apply whatever appearance you want to the TDs instead of the FIELDSETs.

td { border: 2px solid red; }
fieldset { border: 0; padding: 0; }

<td>
<fieldset>
...
</fieldset>
</td>
<td>
<fieldset>
...
</fieldset>
</td>

--
Kris
<kr*******@xs4all.netherlands> (nl)
<http://www.cinnamon.nl/>
Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.