CSS Box Model
Design concept to describe how elements are rendered.
CSS Box Model
Open up any website and inspect the elements.
CSS Box Model
height, min-height, max-height
width, min-width, max-width
CSS Box Model
padding-top, padding-right, padding-bottom, padding-left
padding: <top>, <right>, <bottom>, <left>padding: <top>, <horizontal>, <bottom>padding: <vertical>, <horizontal>CSS Box Model
border-width: 2px;border-style: solid;border-color: #000000;border: <width> <style> <color>;CSS Box Model
margin-top, margin-right, margin-bottom, margin-left
margin: <top>, <right>, <bottom>, <left>margin: <top>, <horizontal>, <bottom>margin: <vertical>, <horizontal>CSS Box Model
CSS Box Model
div ElementThe div Element
div ElementThe div element (short for "division") is a generic container that is used to group and organize other elements on a web page.
<div>
<p>This is some text inside a div container.</p>
<img src="example.jpg" alt="example image">
</div>
The div Element
div Elementdiv elements are commonly used to create layouts for your page
div containerCSS Box Model
CSS Flexbox