Hello,
I am working on traditional web and I have an screen in which I have only a container.
I want to set this container in the center/middle of every screen.
I have specify the align to center but the container remains on the top of the screen and is not set to the middle of it.
Any idea?
Hi @George M
You can achieve it using css below
.containerCenter { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }Add it here in screen style (Select the Container-> Go to Properties -> Go to Style Classes property -> Go to Style Sheet Editor and paste above css.
Use containerCenter class into Style Classes property.
Your container will be in center of screen always.
Please check attached .oap file for more help
Hi @George M,
You can also achieve that by using Flex (Using Flex property will be more precise and preferable)
.container{
display: flex;align-items: center;justify-content: center;
}
Hope it helps,Nandhakumar S.
This works well, thank you !
Use Outsystems predefine classes for this.
Remember this classes add on parent div or container and all child elements should be in enclose container or div