View Full Version : CSS: "height: 100%" leaves unwanted space at the top

09-29-2007, 01:14 PM
When I set my CSS "wrapper" (which will contain several sections) to a width and height of 100%, there is a white space at the top. That space is made up for, but of course that goes "below screen" and one has to scroll.

Here's the problem:

I can't see a problem with the CSS code (http://www.indigetesdii.org/idnew/css.php) myself, but I reckon this is not how 100% is normally viewed, so I'm fairly sure I'm missing something :/

Thanks in advance.

09-29-2007, 01:30 PM
Prior to your wrapper div you have an empty table that has a height of 15%. If you get rid of that your space goes away.

<table width="100%" height="15%" border="0">

Also, you need to get rid of the default margins applied (differently) by various browsers.
* {margin:0; padding:0} will do that for you.


09-29-2007, 01:36 PM
Oh god... that's a remainder from the current site, which used pixels to define the width and height, and to make it work properly in IE I had to add that table. How stupid do I feel now! Never recycle your old code eh :rolleyes:

I'll add the 0 margins as well... Thanks for the swift reply!