Центр Div CSS
.center {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
Puzzled Penguin
.center {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
/*ADD MARGIN auto to left and right*/
.box1{
width:80%;
margin:0 auto;
}
.center{
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
element {display: block; float: left; vertical-align: middle; text-align: center}
.element {
margin: auto;
}