align-items : center;
This one and
text-align : center;
What's the difference between you two?css
text-align: center; is simply "Hey! Centrally align the text contained in this element by its full width". The premise is that the element that specifies this style property is an inline block or at least a block, and only the inline elements within that element can be centered and, above all, not related to Flexbox.
align-items is a type of Flexbox specification. The premise is that the element to which you want to specify that style attribute and the element to be centralized are components of Flexbox. What is Flexbox? If you are curious about
align-items, you must study on your own.After studying you will understand that
text-align may be more appropriate for limited purposes.
© 2022 pinfo. All rights reserved.