1. Computing

Discuss in my forum

How do I eliminate the margins around my page?

By

Question: How do I eliminate the margins around my page?
Answer:

If you want to get rid of the margins on your pages, you need to play with attributes of the body tag:

  • leftmargin
  • topmargin
  • marginheight
  • marginwidth

To force both Netscape and Internet Explorer to recognize that you don't want margins, you have to set all four of these attributes to "0". For example:
<body body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0">

You can also use the CSS property "margin" to set the margins on your body element:
body {
  margin : 0px;
}

More on the body tag
More on the margin property
Help with Cascading Style Sheets

©2014 About.com. All rights reserved.