shadowayex Posted May 29, 2008 Share Posted May 29, 2008 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 More sharing options...
newseed Posted May 29, 2008 Share Posted May 29, 2008 If you have a css file, put this in it:body { margin: 0; padding: 0;} Link to comment Share on other sites More sharing options...
shadowayex Posted May 29, 2008 Author Share Posted May 29, 2008 If you have a css file, put this in it:body { margin: 0; padding: 0;}Didn't do anything in Firefox. Worked in IE though. Link to comment Share on other sites More sharing options...
BlueDigit Posted May 29, 2008 Share Posted May 29, 2008 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 More sharing options...
shadowayex Posted May 29, 2008 Author Share Posted May 29, 2008 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 More sharing options...
rangana Posted May 29, 2008 Share Posted May 29, 2008 Could you provide us a link?..if none, up the code Link to comment Share on other sites More sharing options...
shadowayex Posted May 29, 2008 Author Share Posted May 29, 2008 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 More sharing options...
Ingolme Posted May 29, 2008 Share Posted May 29, 2008 It's just what I imagined.Add this to your stylesheet:h1 { margin: 0; } Link to comment Share on other sites More sharing options...
shadowayex Posted May 29, 2008 Author Share Posted May 29, 2008 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.