css - Media Query:Setting padding-top based for iPhone screen -
normal css:
.container-step1 { text-align: center; margin: 0 auto; padding-top: 12%; width: 50em !important;/*60em*/ height: 35em; }
for mobile want update padding-top:25%;
. tried:
@media screen , (max-device-width: 480px) { .container-step1 { text-align: center; margin: 0 auto; padding-top: 25%; width: 50em !important;/*60em*/ height: 35em; } }
it didn't work. safari still referring normal css.
max-device-width
vs max-width
. max-width
work on desktop & mobile , max-device-width
work on mobile.
also, need add css updated in query. remove redundant css.
.container-step1 { text-align: center; margin: 0 auto; padding-top: 12%; width: 50em !important;/*60em*/ height: 35em; } @media screen , (max-device-width: 480px) { .container-step1 { padding-top: 25%; } }
Comments
Post a Comment