954,598 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Can't get rid of space at top of web page...

I have a very simple webpage using css. For some odd reason there is about a 20px space at the top of my page. I have no idea where this is coming from! Any ideas?

Here is the page that is causing me grief:

http://www.laudontech.com/exhibitfloorplans/test5.php5
http://www.laudontech.com/exhibitfloorplans/demomaps.css

Thanks in advance,

Mapper

Mapper99
Light Poster
42 posts since Apr 2008
Reputation Points: 10
Solved Threads: 0
 
body {
  text-align:center;
  font-family: Georgia, Serif;
  background: #000000;
 margin:0px;
}


i think this can help u

atifdmv
Light Poster
25 posts since May 2009
Reputation Points: 10
Solved Threads: 0
 

order is important in css
in some of the styles you set

margin-top:0;
margin:5px;


result margin-top:5px; in other styles you correctly zero the top margin

margin:5px;
margin-top:0;


a group of applied 5px will soon add to the 'missing' amount

almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376
 

Do not put px on a zero value. It is not supported. Put 0 instead of 0px.

MidiMagic
Nearly a Senior Poster
3,319 posts since Jan 2007
Reputation Points: 730
Solved Threads: 182
 

make sure there are no in your code that will create a space if in the wrong place

!!underlink!!
Newbie Poster
10 posts since May 2009
Reputation Points: 10
Solved Threads: 2
 

also make sure that the div or table you have as your header, has no margin-top pushing it down.

MJ Pieterse
Junior Poster
145 posts since Mar 2009
Reputation Points: 13
Solved Threads: 18
 

I followed most of the advice I found on here, and finally what worked for me was the body-top:0; I had originally used just the standard header or wrapper or whatever:0px; so hats off to you and kudos good sir.
Enjoy.
and if anyone wants to visit my humble self, feel free to wander over to [url removed ]

seointexas
Newbie Poster
1 post since Mar 2010
Reputation Points: 10
Solved Threads: 0
 

you need to set a negative margin rtfm -20px etc easy peasy

rany1234
Newbie Poster
1 post since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

check the margin-top and padding-top of ur each style class (especially outer)... and check the heights and min-height of each div tag... google chrome inspect functionality may be helpful to solve this...

shibin vadayatt
Newbie Poster
6 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You