Skip to content

Instantly share code, notes, and snippets.

@exarcheia-web
Created June 3, 2013 15:43
Show Gist options
  • Save exarcheia-web/5699084 to your computer and use it in GitHub Desktop.
Save exarcheia-web/5699084 to your computer and use it in GitHub Desktop.
Box Model - old and new
/* Box Model - old and new */
html {
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
font-family:Tahoma,sans-serif;
}
* {
margin: 0;
padding: 0;
}
.old-model {
background: white;
float: left;
width: 80px;
height: 80px;
border: 20px solid black;
padding: 20px;
margin: 20px;
}
.new-model {
box-sizing: border-box;
background: white;
float: left;
width: 160px;
height: 160px;
border: 20px solid black;
padding: 20px;
margin: 20px;
}
<div class="old-model">Box Model</div>
<div class="new-model">Box Model</div>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment