# How can I set height of table to 100% in stylesheet?

**URL:** <https://forum.kirupa.com/t/how-can-i-set-height-of-table-to-100-in-stylesheet/191290>\
**Category:** web dev\
**Created:** [June 19, 2006, 1:11pm UTC](https://forum.kirupa.com/t/how-can-i-set-height-of-table-to-100-in-stylesheet/191290 "2006-06-19T13:11:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![spindrift](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@spindrift](https://forum.kirupa.com/u/spindrift)\
**Post date:** [June 19, 2006, 1:11pm UTC](https://forum.kirupa.com/t/how-can-i-set-height-of-table-to-100-in-stylesheet/191290/1 "2006-06-19T13:11:30Z")

</div>

Hi guys,

I have a table which I want to set the height of to 100%.

The table has been given an id of “main” so how can I set the height in my stylesheet.

I’ve tried various combinations of things but to no avail. At the moment I have:

```auto
#main {
 	background-color: #FFFFFF;
	vertical-align: top;
	height: 100%;
}

```

Thanks very much and hope to hear from you.

All the best,

Mark
