How to align an image in LoadingScreen

Hi there,
I’m trying to build a customized loading screen, but I can not move the loading image to the center of the screen…:thinking: I mean both horizontal and vertical.
https://www.babylonjs-playground.com/#5Y2GIC#32


Thanks! :grinning:

That’s CSS question. Not sure it belongs here :smiley: But anyway here is one of the oldest tricks in the book.

https://www.babylonjs-playground.com/#5Y2GIC#33

1 Like

In that case you kinda need height in pixels so you can offset margin for the half of the width of the image.
If you want some newer approach you can use flex properties on the parent of the image (loadingDiv). In this case you can use percentage height.

https://www.babylonjs-playground.com/#5Y2GIC#34

1 Like

:grinning:Thank you very much!

1 Like