Preparing your workspace
The display property controls how an element participates in layout, while normal flow determines how elements naturally appear on the page.
Block elements normally start on a new line and can take available width. Inline elements remain within the current line and normally do not accept width and height in the same way as block elements. Inline-block combines useful parts of both behaviors. Understanding normal flow is important because most page layouts begin with elements participating naturally in the document. CSS layout systems such as Flexbox and Grid can then be used when more control is needed.
A navigation area may contain inline or flex-based links, while sections of page content naturally stack as block-level elements.
.item {
display: inline-block;
width: 150px;
padding: 20px;
margin: 10px;
}
.section {
display: block;
}The .item elements can sit next to each other while still accepting width and height-related properties.