0

I centered some objects on a website, added some images, horizontal lines, etc. Everything works just fine but their remains some kind of 10 or 20 pixel margin on the left that I can´t edit. My centered Images are thatswhy 10-20 pixels too much on the right an an horizontal top border of a div that has 100% width does only reach from the right end of the screen to 10-20 pixels before the left end of the screen. Do you have any idea whats could be wrong with my website?

Max imal
  • 35
  • 6

2 Answers2

1

The body element has a default margin

Appendix D. Default style sheet for HTML 4.

body            { margin: 8px }

You can simply remove it with body { margin:0 }

Danield
  • 121,619
  • 37
  • 226
  • 255
0

The answer is this comment:

Did you reset the default margin on the body to 0? body { margin:0; } – Danield

Thanks Danield!

Community
  • 1
  • 1
Max imal
  • 35
  • 6