A
A
akokin2018-03-21 23:07:39
css
akokin, 2018-03-21 23:07:39

Flexbox: Is it possible to create containers inside a container?

Hello.
Started learning flexbox. There were questions that Google does not give an answer to:
1. is it possible to create containers inside a container or even inside an element?
2. is it possible and correct to make several containers on one page (for example, one under the other)?
The questions are so stupid, because you need a layout for IE, in which grids have not yet been implemented, and elements need to be placed in all sorts of different ways.
Almost the same thing is repeated in all the descriptions of flexbox, and the examples are the simplest, but none of them answers the questions I posed.
And one more question: what exactly is the difference between the inline-flex property and flex? I saw an example, but the meaning escapes ...
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Varlamov, 2018-03-21
@akokin

1. This is probably written at the beginning of all tutorials. Yes, you can. Nested flex is part of the standard.
2. As many as you like. It doesn't hurt performance.
3. everything works in ie, but there are a lot of nuances that are described here https://github.com/philipwalton/flexbugs. There are still a lot of bugs that come out due to interaction with tables that are not described there, and more problems with adaptability, etc., which I solved through max-width. But you might be lucky.
4. inline-flex from flex. What is the difference between block and inline-block? The fact that you can place a block in a line that will be affected by, say, vertical-align

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question