Skip to content

Instantly share code, notes, and snippets.

@pshushereba
Created April 26, 2019 16:11
Show Gist options
  • Save pshushereba/c4cb99654909710a7977f11288060c3c to your computer and use it in GitHub Desktop.
Save pshushereba/c4cb99654909710a7977f11288060c3c to your computer and use it in GitHub Desktop.
4/25/19 - Box Model Lecture Notes
/* The Box Model */
.box {
background-color: aqua;
width: 400px;
/* TRBL */
padding: 75px;
/* padding-top: 10px;
padding-left: 10px;
padding-right: 10px;
padding-bottom: 10px; */
/* size, type, color */
border: 15px solid salmon;
/* Margin TRBL */
margin: 75px;
/* Removes the element from the flow of the page */
display: none;
/*
Takes up horizontal space
Introduces a page break
respects the box model completely
*/
display: block;
/*
Takes up the horizontal space of it's content only
content flows around them nicely
respects the horizontal aspets of the box model but not the top and bottom
*/
/* display: inline; */
/*
Takes upt he hotizontal space of it's content only
Content flows around them nicely
Respects the box model completely
no page break
*/
display: inline-block;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment