Jump to content

Top Padding or something.


shadowayex

Recommended Posts

I have my page set up so there's a <div> that all the content goes into that is set to be so many pixels wide so that it displays well in all resolutions. Well, I noticed the div doesn't extend to the top of the page. I figured it was something that I'd have to live with, but then I noticed that w3schools.com's banner is all the way at the top of the page. How to I get rid of the space at the top so my div extends to the top?

Link to comment
Share on other sites

Hmmm... Try this:

body{margin: 0px;padding: 0px;}

I think remember reading somewhere that Firefox just disregards the 0 entirely if it isn't specified what the 0 is. (I.E. 0px, 0cm, etc.)

Link to comment
Share on other sites

Hmmm... Try this:
body{margin: 0px;padding: 0px;}

I think remember reading somewhere that Firefox just disregards the 0 entirely if it isn't specified what the 0 is. (I.E. 0px, 0cm, etc.)

Still didn't. It cut the margin/padding on all sides but the top.
Link to comment
Share on other sites

http://hugdontmug.freehostia.com/http://hugdontmug.freehostia.com/stylesheet.cssThere's not much to it because I want to get the layout to work before I add in the other stuff. Also, I have height: 100%; in both my body and div.content parts, but it doesn't show. I want the div.content to extend the full page all of the time.
Link to comment
Share on other sites

It's just what I imagined.Add this to your stylesheet:h1 { margin: 0; }
Wow... I read that and even before I tried it, the problem clicked :). Completely forgot about the h1 margin. Thanks.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...