# Container div won't reach top of body

**URL:** <https://forum.kirupa.com/t/container-div-wont-reach-top-of-body/224149>\
**Category:** Uncategorized\
**Created:** [April 29, 2007, 9:28am UTC](https://forum.kirupa.com/t/container-div-wont-reach-top-of-body/224149 "2007-04-29T09:28:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![abuchuk](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@abuchuk](https://forum.kirupa.com/u/abuchuk)\
**Post date:** [April 29, 2007, 9:28am UTC](https://forum.kirupa.com/t/container-div-wont-reach-top-of-body/224149/1 "2007-04-29T09:28:48Z")

</div>

Hi.

I’m sure someone has asked this question, but I couldn’t find it anywhere.  
I’m trying to postion my container div in the center of the page, with NO margin at the top or bottom, and a height of 100%.

body  
{  
margin:0;  
padding: 0;  
}  
#container  
{  
margin: 0px auto;  
padding: 0;  
width: 1000px;  
height: 100%;  
}

I can’t figure out when height:100% works or not (it’s not working here) and even if I define a height in pixels, the container won’t start at the top of the page (IE6, Mozilla). Isn’t there a way to get this effect without giving the div a negative margin?

Thanks for your help.  
Abuchuk
