Article 5 | Vertical alignement

| None of the (absolute) Container/Box combinations work …



Article 5 | Vertical alignement Float:left Resize: vertical
n°3Float:right
CENTER BLOCK
(Defined in 3rd position in 3 line code: 1,3,2) Float:none




For many components in the tests below, CSS is not even rendered as coded, compared to the wab examples!


1/ CSS Flexbox Method | Does not work as described ≥ See example


The two child elements (.box) are aligned vertically with flex-direction: column.
For horizontal alignment, switch the flex-direction to row (or simply remove the rule as flex-direction: row is the default setting). The items will remain centered vertically and horizontally


class=BodyALL / id=containerFlexVert

DIV class=boxFlex #1

DIV class=boxFlex #2


class=BodyALL / id=containerFlexHor

DIV class=boxFlex #1

DIV class=boxFlex #2





2/CSS Table and Positioning Method | Does not work as described

BodyALL / containerTable

DIV class=boxTable #1

DIV class=boxTable #2

.
.
.
.
.


Which method to use… If you’re not sure which method to use, I would recommend flexbox for these reasons:
minimal code; very efficient
as noted above, centering is simple and easy (see another example)
equal height columns are simple and easy
multiple options for aligning flex elements
it’s responsive
unlike floats and tables, which offer limited layout capacity because they were never intended for building layouts, flexbox is a modern (CSS3) technique with a broad range of options.





3/CSS Centering Method | Does not work as described. Changed the position:absolute property to relative.


BoxA1… [ xyz-ics snippet=”Lorem”] // …

[ sc name=”lorem”][/sc] Text Text Text

BENEATH #1 Container1

MNO

BoxA2… [ xyz-ics snippet=”Lorem”] // …
[ sc name=”lorem”][/sc] Text Text Text

BENEATH #2 Container2


.
.
.
.
.



 Article 5 | Vertical alignement    |   article5 Edit post - id:49341

2
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
4

acf_wys4
Edit sc_2


LEFT
RIGHT
CENTER

ØØØØØ

Article 5 | Vertical alignement Child0 margin: auto 20px; Text Text
Article 5 | Vertical alignement Child1 margin: auto auto; Text Text
Article 5 | Vertical alignement Child0 – Child2 align-items: center; /* vertical */ justify-content: left; /* horizontal */ Text Text
Article 5 | Vertical alignement Child0 – Child3 text-align: 2px!important; vertical-align:middle!important; Text Text
Article 5 | Vertical alignement
Child0 – !!!! Child4 position:relative; top:0; bottom:0; left:0!important; right:0!important; margin:auto !important;

········


········