View Full Version : getting fieldset to take up 100% height of table cell

04-14-2011, 06:45 PM
How do I force my fieldset to take up 100% of the height of the table cell it's in?

04-15-2011, 09:27 AM
To set a % height on an element, all of its parent elements must have a height set on them.

Maybe use this demo as a guide.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<style type="text/css">
html,body {
height: 100%;
fieldset {
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
border: 2px solid red;
#table1 {
height: 300px;
#table1 tr, #table1 td {
height: 100%;
#table1 td fieldset {
height: 100%;
<script type="text/javascript"></script>
<table id="table1" border="1" cellspacing="0">
<input type="text" name="txt1" />
<td>line 1<br />line 2<br />line 3<br />line 4<br />line 5<br />line 6</td>