Jump to content

Top Padding or something.


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 post
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 post
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 post
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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...