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

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -