diff --git a/flexbox/flex.html b/flexbox/flex.html index a3fe307..ea6a091 100644 --- a/flexbox/flex.html +++ b/flexbox/flex.html @@ -14,7 +14,7 @@ span { background-color: aqua; width: 80px; - height: 80px; + height: 40px; border: 1px dotted blue; margin: 10px; padding: 10px; @@ -35,17 +35,31 @@ justify-content: center; } - .flex-rows { + .flex-row { display: flex; height: 200px; align-content: flex-end; flex-flow: row wrap; } - .flex-rows span { + .flex-row span { flex-grow: 1; } + .flex-n-per-row { + display: flex; + height: 350px; + flex-flow: row wrap; + /*justify-content: space-between;*/ + } + + .flex-n-per-row span { + /* the key trick here is the flex-basis 24% which is just below 1/4 => 4 elements would fit on the page + in case there is no padding and margin (that is distrubuted separately) + */ + flex: 1 0 24%; +} + @@ -59,7 +73,7 @@
-