Fieldset height

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Trent

    Fieldset height

    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:10 0%;">
    <tr>
    <td style="width:50 %; height:100%;">
    <fieldset style="height:1 00%">
    <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>Locatio n</legend>

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

    <br />
    <label for="hwy">Highw ay #</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">Se ctor</label>
    <input type="text" id="sector" name="sector"/>

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

    </div>
    </body>
    </html>
  • Kris

    #2
    Re: Fieldset height

    In article <221fd1f2.04040 60820.69c0843f@ posting.google. com>,
    spacerook@marx7 .org (Trent) wrote:
    [color=blue]
    > I have a <fieldset> in a <TD>. I want the fieldset to be as high as
    > the TD.[/color]

    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
    <kristiaan@xs4a ll.netherlands> (nl)
    <http://www.cinnamon.nl/>

    Comment

    • Trent

      #3
      Re: Fieldset height

      Kris <kristiaan@xs4a ll.netherlands> wrote in message news:<kristiaan-8F2FEF.22300806 042004@news1.ne ws.xs4all.nl>.. .[color=blue]
      > In article <221fd1f2.04040 60820.69c0843f@ posting.google. com>,
      > spacerook@marx7 .org (Trent) wrote:
      >[color=green]
      > > I have a <fieldset> in a <TD>. I want the fieldset to be as high as
      > > the TD.[/color]
      >
      > 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?[/color]

      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.

      Comment

      • Kris

        #4
        Re: Fieldset height

        In article <221fd1f2.04040 70332.124f7e0a@ posting.google. com>,
        spacerook@marx7 .org (Trent) wrote:
        [color=blue][color=green][color=darkred]
        > > > I have a <fieldset> in a <TD>. I want the fieldset to be as high as
        > > > the TD.[/color][/color][/color]
        [color=blue][color=green]
        > > Are you sure you need a table in the first place?[/color][/color]
        [color=blue]
        > 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.[/color]

        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
        <kristiaan@xs4a ll.netherlands> (nl)
        <http://www.cinnamon.nl/>

        Comment

        Working...