How To Center Anything in CSS (with Flexbox)

preview_player
Показать описание
One of the few uncontroversial opinions in software development is that CSS is hard, messy and complicated. Simple tasks such as putting an element in the center of its parent element have historically proven to be far more difficult than they need to be. In this video I introduce you to flexbox and the two flexbox properties that really are all you need to center things in CSS.

align-items:

justify-content:

00:00 Introduction
00:58 Why Is It Complicated
01:36 Flexbox
02:49 HTML Example
03:42 2 Centering Properties
05:01 Resulting CSS
05:43 Conclusion
Рекомендации по теме