If you only care about modern browsers this is a great way to center elements on a page using only a few lines of css.
.container {
position: relative;
}
.center {
position: absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%);
}
If you only care about modern browsers this is a great way to center elements on a page using only a few lines of css.
.container {
position: relative;
}
.center {
position: absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%);
}