Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Example of css inline-flex vs. flex [duplicate]

Tags:

css

flexbox

I'm reading up on flexbox layout described here: https://css-tricks.com/snippets/css/a-guide-to-flexbox/

The container display property can be set to either flex or inline-flex. Can point to a resource that shows what happens when either setting is applied?

I tried looking at various tutorials, but all of them use flex only. For example in the css tricks article inline-flex only shows up twice.

TIA, Ole

like image 561
Ole Avatar asked Dec 19 '22 19:12

Ole


1 Answers

display: flex; causes the flex container to act as display: block; in relation to the rest of the page.

display: inline-flex; causes the flex container to act as display: inline-block; in relation to the rest of the page.

like image 131
amflare Avatar answered Dec 21 '22 07:12

amflare