If you mean only centering between the left and right edges, you create an element with a fixed width and declare margin: auto;on it.
If you want to center the element both horizontally and vertically, you position it halfway horizontally and vertically, then pull it half the width and height of the element.
:
.someElement {
position: absolute;
top: 50%;
left: 50%;
width: 200px;
height: 200px;
margin: -100px 0 0 -100px;
}