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}