I am trying to center an image for all mobile devices when page is loading.I am working with scss.This is my code:
.page-is-changing {
.cd-logo {
position: fixed;
z-index: 4;
background: url($image-base-path+"/common/logo.svg") no-repeat;
top: 40%;
animation: animatezoom 0.8s;
left: calc(50% - 5.6rem);
width: 11.3rem;
height: 10%;
}
@media screen and (max-width: 780px) {
.cd-logo {
position: fixed;
z-index: 4;
margin: 0;
background: url($image-base-path+"/common/logo-small.svg") no-repeat;
top: 40%;
left: 50%;
width: 11.3rem;
height: 10%;
}
}
}
But the problem is that the logo is coming ok for web application but not coming to the center in browser mobile devices.
Can you help me please to fix the issue,us for scss I can't put margin=auto