943,648 Members | Top Members by Rank

Ad:
May 5th, 2009
0

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

Expand Post »
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/exhibitflo...s/demomaps.css

Thanks in advance,

Mapper
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
Mapper99 is offline Offline
42 posts
since Apr 2008
May 5th, 2009
0

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

css Syntax (Toggle Plain Text)
  1. body {
  2. text-align:center;
  3. font-family: Georgia, Serif;
  4. background: #000000;
  5. margin:0px;
  6. }

i think this can help u
Last edited by peter_budo; May 7th, 2009 at 5:17 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reputation Points: 10
Solved Threads: 0
Light Poster
atifdmv is offline Offline
25 posts
since May 2009
May 5th, 2009
0

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

order is important in css
in some of the styles you set
css Syntax (Toggle Plain Text)
  1. margin-top:0;
  2. margin:5px;
result margin-top:5px; in other styles you correctly zero the top margin
css Syntax (Toggle Plain Text)
  1. margin:5px;
  2. margin-top:0;
a group of applied 5px will soon add to the 'missing' amount
Last edited by almostbob; May 5th, 2009 at 9:12 am.
Reputation Points: 562
Solved Threads: 368
Posting Maven
almostbob is offline Offline
2,970 posts
since Jan 2009
May 10th, 2009
0

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

Do not put px on a zero value. It is not supported. Put 0 instead of 0px.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007
May 11th, 2009
0

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

make sure there are no   in your code that will create a space if in the wrong place
Reputation Points: 10
Solved Threads: 2
Newbie Poster
!!underlink!! is offline Offline
10 posts
since May 2009
May 18th, 2009
0

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

also make sure that the div or table you have as your header, has no margin-top pushing it down.
Reputation Points: 13
Solved Threads: 18
Junior Poster
MJ Pieterse is offline Offline
144 posts
since Mar 2009
Mar 6th, 2010
0

What worked for me was...

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 ]
Last edited by Ezzaral; Mar 8th, 2010 at 2:49 pm. Reason: Snipped url. Please read the rules about not promoting your site.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
seointexas is offline Offline
1 posts
since Mar 2010
Oct 24th, 2011
0

getting rid of space at top

you need to set a negative margin rtfm -20px etc easy peasy
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rany1234 is offline Offline
1 posts
since Oct 2011
Oct 25th, 2011
0
Re: Can't get rid of space at top of web page...
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...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
shibin vadayatt is offline Offline
6 posts
since Oct 2011

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: Float: Left; not working in CSS
Next Thread in HTML and CSS Forum Timeline: Web Browsers Not Showing Scroll Bar





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC