Thursday, October 6, 2022

Two Flexbox Basics

Flexbox lets you lay out page elements similar to the boxes & springs approach used by other frameworks.

To turn it on set style="display:flex;"wherever you'd like to use it. This can be the entire <body> or just a <div>. Flex layout will now apply to any elements within this element. You can think of these child elements like the boxes from boxes & springs.

To add springs use justify-content. It puts springs in the places you'll most likely want them with the values space-evenly, space-between, and space-around.

No comments:

Post a Comment