html,body {margin:0; padding:0;border:0}

Source: Internet
Author: User

  body,html   /*  Set the window div to browser size *  /{      margin:0;       padding:0;       height:100%;        }

The following code

<!DOCTYPE HTML><HTMLLang= "en"><Head><style>#side{float: Left;width:30%;Height:300px;Background-color:#99FF99;    }#main{Margin-left:30%;width:70%;Height:300px;Background-color:#99FFFF;    }    </style></Head><Body><DivID= "side">1</Div><DivID= "Main">2</Div></Body></HTML>

There will be white on both sides.

==================================================================

and the following code

<!DOCTYPE HTML><HTMLLang= "en"><Head><style>Html,body{margin:0;padding:0;Border:0;    }#side{float: Left;width:30%;Height:300px;Background-color:#99FF99;    }#main{Margin-left:30%;width:70%;Height:300px;Background-color:#99FFFF;    }    </style></Head><Body><DivID= "side">1</Div><DivID= "Main">2</Div></Body></HTML>

Let the outer and inner margins of the overall outline be 0

There is also a wildcard character written

*   {margin:0; padding:0; border:0;}

* is a representation of all elements for HTML.
Margin represents the outer margin of the bounding rectangle, and the trailing 0 indicates that no blank space is left.
Padding indicates that the border is filled with content, and the following 0 means no blank space.
The border represents the border, and the following 0px indicates that the border width is 0 pixels, and the border is plotted none to not draw the border.

html,body {margin:0; padding:0;border:0}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.