CSS - właściwości box-sizing


box-sizing

kod wynik kodu
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
<meta http-equiv="Content-Language" content="pl">
<title>CSS - visual formatting</title>
<link rel="Stylesheet" type="text/css" href="style.css" />
<style type="text/css">
div {
width: 300px;
height: 100px;
background: lightcyan;
border: 20px solid black;
}
.one {
box-sizing: border-box;
}
.two {
box-sizing: padding-box;
}
.thre {
box-sizing: content-box;
}
</style>
</head>
<body>

<div class="one"></div>
<div class="one"></div>
<br /><br />
<div class="two"></div>
<div class="two"></div>
<br /><br />
<div class="three"></div>
<div class="three"></div>

</body>
</html>