Single Control
To center any control:
- Add a grid control to your page
- Add the control you want to center into the grid
- Right-click on the Grid control and select the ‘Style’ menu option
- Add the CSS below to the control
display: grid;
place-items: center;
height: 100vh; /*should exceed the height of the centered control*/
width: 100vw; /*should exceed the width of the centered control*/
Multiple Controls
To center multiple controls inside a cell
- Add a grid control to your page and add the CSS as above
- Add a Container control into the grid
- Add the CSS attribute ‘text-align: center;’ in the Style section of the Container Control
- Place all controls you wish to center inside the container control
Note: This method does not work well for RadioButtonList and for CheckboxList Controls due to the default styling applied to these controls.
Here is a Stadium 6 sample application
Centering.sapz (7.5 KB)