To center a div in CSS, you can use the following code:
#outer_div {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
This code will center the outer_div element both horizontally and vertically on the page. The position: absolute; property is used to position the element relative to its parent container. The left: 50%; and top: 50%; properties are used to move the element to the center of the page. Finally, the transform: translate(-50%, -50%); property is used to adjust the position of the element so that it is perfectly centered.