Created
May 30, 2020 01:45
-
-
Save agustinpfs/dff5fe33d3982b578daf871d8f9f3d0f to your computer and use it in GitHub Desktop.
Box Model CSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>box-model</title> | |
<style> | |
.box1 { | |
background-color: plum; | |
margin: 10px; | |
padding: 10px; | |
width: 200px; | |
height: 200px; | |
box-sizing: border-box; | |
border: 10px blue solid; | |
display: inline-block; | |
} | |
.box2 { | |
background-color: plum; | |
margin: 10px; | |
padding: 10px; | |
width: 200px; | |
height: 200px; | |
box-sizing: content-box; | |
border: 10px blue solid; | |
display: inline-block; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="box1">box-sizing: border-box</div> | |
<div class="box2">box-sizing: content-box</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment