Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

purpose

flex is another modern layout engine that tries to solve or at least alleviate
the obvious deficiencies of the old-school block model and related tools



ex1 - default is row nowrap

by default, direction: row, wrap: nowrap

Loading...

ex2 - flex-wrap: wrap

identical except that we specify flex-wrap: wrap

Loading...

assignment: the css-tricks page

the flex display is an extremely powerful tool for fine-grained control over your layout
to deepen your understanding of it :


grid’s and flex’s


practice: layout a header

mimick the layout below

Loading...

challenge (optional)

if you believe you have a full understanding of how CSS layouts work,
you should give this test a shot (and you will feel more humble afterwards ;-)