Jump to content

Margins


DarkElf

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...