File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -322,6 +322,22 @@ <h2 class="no-toc no-num">Status of this document</h2>
322322
323323 < p > This cannot top-align the first child and bottom-align
324324 the second.
325+
326+ < li >
327+ < p > Vertically centering a single element could also be
328+ modeled as a float with an offset. A draft of
329+ [[CSS-PAGE-FLOATS]] from 2013 suggests the following to
330+ center a P vertically inside its parent DIV:
331+
332+ < pre > DIV {height: 15em;
333+ colums: 1} /* Make the DIV act like a "page" */
334+ P {float: top left; /* Place the P in the corner of the DIV... */
335+ float-offset: 0 50%} /* ... and add 50% offset vertically */</ pre >
336+
337+ < p > Floats like this also allow to put all children at the
338+ top and the last child against the bottom. But only one
339+ child: trying to push multiple children down to the bottom
340+ results in their order being reversed.
325341 </ ol >
326342 </ div >
327343
You can’t perform that action at this time.
0 commit comments