.parent { container-type: inline-size; } @container (min-width: 600px) { .child { align-self: center; } }