mx-auto
centers block-level elements by distributing horizontal space. This only works if the element's width is less than its container's width.
Gotcha: This `div` is a block element, so it defaults to `width: auto;`, which makes it take up the full available width of its parent. While `mx-auto` sets `margin-left: auto;` and `margin-right: auto;`, there's no leftover space to distribute, so it appears uncentered (it is, in fact, full-width).
Gotcha: Similar to the above, `w-full` makes the element take all available width. `mx-auto` has no visual effect for centering because there is no horizontal space to distribute.
Correct: With a defined width less than the parent (e.g., `w-1/2`), `mx-auto` can distribute the remaining space equally on both sides.
Correct: `max-w-*` also defines a width constraint, allowing `mx-auto` to work effectively. This is often preferred for responsive designs.