Doing it with style
This is a text panel with percentage width/height that is centered within an outer container using margin:auto;
A simple method of vertical and horizontal centering anything using just margin:auto;
This can include text, images, forms etc.
The centered content can be sized in pixels, ems or percentage and can also be responsive if the outer container is resized.
See the page source code for the simple stylesheet and html code.
Because of all the time and effort spent in producing this demonstration I would ask that you respect my copyright.
Your donations keep CSS PLAY running.
If your donation is for the use of a demo then please email me with the demo url after making your donation.