KokoaTalk Clone Coding: CSS padding 1
Padding is the exact opposite of margin's point.
Padding is the spaces from the border of the box to the inside.
<html>
<head>
<style>
html {
background-color: gray;
}
body {
margin: 0;
background-color: steelblue;
}
div {
height: 200px;
width: 200px;
background-color: thistle;
}
</style>
</head>
<body>
<div></div>
</body>
</html>
<html>
<head>
<style>
html {
background-color: gray;
}
body {
margin: 0;
padding: 20px;
background-color: steelblue;
}
div {
height: 200px;
width: 200px;
background-color: thistle;
}
</style>
</head>
<body>
<div></div>
</body>
</html>