filmov
tv
Understanding the CSS Display Property - block, inline, & inline-block

Показать описание
► The display property is responsible for how an element appears on the page. The main display properties (which we will cover in this video) are:
- block
- inline
- inline-block
Elements with display: block occupy the horizontal space of their container, stretching the full width available to them. Their height is determined by what their content needs.They can accept height and width properties which allow us to control size.
Inline elements only occupy the space their content needs, they sit in line, or within the content flow of block elements. They do notaccept height and width properties.
Elements with display inline-block mix behaviors of the other two display types. Inline in that they don't occupy their own line and sit next to other inline and inline-block elements. But block in that the height and width properties can be used now. So we can manipulate their size.
► Timestamps:
0:00 Start
0:51 The CodePen
2:04 display: block;
2:56 display: inline;
3:45 display: inline-block;
5:51 Touching on display: flex;
7:11 Replaced elements
8:11 Summary
► Get the code:
► Links used in the video:
► Social Media:
► Code & Projects:
- block
- inline
- inline-block
Elements with display: block occupy the horizontal space of their container, stretching the full width available to them. Their height is determined by what their content needs.They can accept height and width properties which allow us to control size.
Inline elements only occupy the space their content needs, they sit in line, or within the content flow of block elements. They do notaccept height and width properties.
Elements with display inline-block mix behaviors of the other two display types. Inline in that they don't occupy their own line and sit next to other inline and inline-block elements. But block in that the height and width properties can be used now. So we can manipulate their size.
► Timestamps:
0:00 Start
0:51 The CodePen
2:04 display: block;
2:56 display: inline;
3:45 display: inline-block;
5:51 Touching on display: flex;
7:11 Replaced elements
8:11 Summary
► Get the code:
► Links used in the video:
► Social Media:
► Code & Projects:
Комментарии