DarkElf Posted January 20, 2006 Share Posted January 20, 2006 This is frustrating me in a very annoying fashion because it should be blindingly simple.I'm trying to create a page which displays without the default margins set by browsers. This not exactly a ground breaking task, its done all over the place and should take one line of code on the css as follows: body {margin: 0px; padding: 0px} I've tried setting negative values, I've tried using different units (e.g. %), I've tried setting each margin/padding seperately, but every time I look at the thing in IE it still uses the default 8px left and right margins (but strangely the top and bottom margins work properly). Can anyone tell me why? Link to comment Share on other sites More sharing options...
HighCaliber Posted January 20, 2006 Share Posted January 20, 2006 Not sure exactly what is wrong but you could try this in your css...html, body {height: 100%; margin: 0px; padding: 0px; width: 100%;}Matt Link to comment Share on other sites More sharing options...
DarkElf Posted January 20, 2006 Author Share Posted January 20, 2006 Nope still doesn't work Link to comment Share on other sites More sharing options...
HighCaliber Posted January 20, 2006 Share Posted January 20, 2006 Not sure,Post your code so I can look at it.Matt Link to comment Share on other sites More sharing options...
DarkElf Posted January 21, 2006 Author Share Posted January 21, 2006 I've spotted the problem now, I was being fool.I'd previously defined a seperate margin for some elements later on in the code, this of course has priority as its more specific than defining the attribute in the body tag.Suppose it serves me right for staying up so late! Link to comment Share on other sites More sharing options...
HighCaliber Posted January 21, 2006 Share Posted January 21, 2006 We all make mistakes. lol Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now