Why doesn't my button center horizontally without 'justify-center'?
Without 'justify-center', flex items align to the start by default, so the button stays left aligned inside the flex container (see step 2).
💡 Use 'justify-center' to center items horizontally in a flex container.
Why is the button not vertically centered without 'items-center'?
'items-center' aligns flex items vertically in the container. Without it, items align to the top by default (see step 2).
💡 Use 'items-center' to center items vertically in a flex container.
Why does the container have no height if I remove 'h-40'?
Without a height or content that defines height, the container collapses to zero height, so background color won't show (see step 1).
💡 Set height or content height to see background colors on containers.