1.child {
2 position: absolute;
3 top: 50%;
4 left: 50%;
5 transform: translate(-50%, -50%);
6}
1position: absolute;
2margin-left: auto;
3margin-right: auto;
4left: 0;
5right: 0;
1#content {
2 position: absolute;
3 left: 0;
4 right: 0;
5 margin-left: auto;
6 margin-right: auto;
7 width: 100px; /* Need a specific value to work */
8}