views:

27

answers:

3

I have tried setting the margin attribute to 0px, but it does not work.

+2  A: 
html, body {
  margin: 0;
  padding: 0;
}
Alec
@Alec, Thanks!. I set the margin for a div. That's why it did not work.
Geoffrey Van Wyk
+1  A: 
html, body
{
    margin: 0px;
    padding: 0px;
}
Gazler
+1  A: 

Set padding and margin to 0 for body tag:

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