+ 1

Center children and z-index

How can I center the children horizontally in the page and stack the circles under .centered? https://sololearn.com/compiler-playground/WEgURf0EFPaW/?ref=app

18th Jan 2025, 7:54 AM
Elena
Elena - avatar
3 Respuestas
+ 1
If I understand your question correctly, you would put the children in a div and centre that. What do you mean by stack?
18th Jan 2025, 9:32 AM
Ausgrindtube
Ausgrindtube - avatar
+ 1
Sorry for not being clear, how to make the elements within .centered display horizontally centered within the page? With stack, I'm trying to arrange the circle elements to look like they're under the .centered element with Z-index property. https://sololearn.com/compiler-playground/WnfPs6Ey5JAG/?ref=app A little like this
18th Jan 2025, 10:10 AM
Elena
Elena - avatar
+ 1
don't nest the 3 circles in the .centered div
18th Jan 2025, 11:40 AM
Bob_Li
Bob_Li - avatar