CSS flexbox - difference between display: flex and display: inline-flex

CSS flexbox - difference between display: flex and display: inline-flex {Celebrity |Famous |}%title%{ Net Worth| Wealth| Profile}
YouTube Excerpt: https://www.smashingmagazine.com/2018/08/flexbox-display-flex-container/ The key to understanding the difference between display: flex and display: inline-flex is that each display property actually consists of two components: outer display model and inner display model. Let's take a look at 3 scenarios to help us understand what happens when we add display: flex; and display: inline-flex; to our container divs. Scenario#1. Without adding any display: flex; or display: inline-flex; our two containers default to display: block (see Chrome dev tools) and our containers stack vertically. Scenario#2. When we add display: flex to our containers, 2 things happen: 1. The outer display model of our flex container becomes "block" and acts like a block level element in the normal flow. In other words, the container becomes display: "block" flex. 2.The inner display model of our flex container becomes flex, so items inside flex container (direct children) become flex items and participate in the flex layout. If we don't declare any flex-direction property they default to flex-direction: row and are placed along the main axis (horizontally in our case). Scenario#3. When we add display: inline-flex to our containers, again 2 things happen: 1.The outer display model of our flex container becomes "inline" and the container acts as inline level element. In other words, the container becomes display: "inline" flex. 2. However, same as in Scenario#2 , the inner display model of our flex container remains flex so its direct children participate in a flex layout. The main difference between the above two display properties is in their outer display models: block or inline which dictates how they behave within the layout.

https://www.smashingmagazine.com/2018/08/flexbox-display-flex-container/ The key to understanding the difference between display: flex and...

Read Full Article ๐Ÿ”

Curious about CSS Flexbox - Difference Between Display: Flex And Display: Inline-flex's Color? Explore detailed estimates, salary breakdowns, and financial insights that reveal the full picture of their profile.

color style guide

Source ID: -edJzAa54q4

Category: color style guide

View Color Profile ๐Ÿ”“

Disclaimer: %niche_term% estimates are based on publicly available data, media reports, and financial analysis. Actual numbers may vary.

Sponsored
Sponsored
Sponsored