.father{ position:relative; width:600px; height:600px; } .son{ width:200px; height:200px; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%) }
.father{ position:relative; width:600px; height:600px; } .son{ width:200px; height:200px; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%) }