I would like to adjust the size of div
inside parent based on the count of divs ?
For examples :
Let's say that parent size is 900px
If there is only one
div
inside the parent, I would like its size100%
If there are two
div
inside the parent, I would like both the same size:50%
If there are three
div
inside the parent, I would like both the same size:33,33333%
If there are four
div
inside the parent, I would like both the same size:25%
(...)
The maximum number of div is 4 but can be more.
Is it possible to do that only in CSS ?