A
A
Alexey Nikolaev2015-09-14 19:35:36
css
Alexey Nikolaev, 2015-09-14 19:35:36

Why does the layout slide when the screen is rotated?

I check through the browser all the permissions - all the rules. I’m watching from an iPhone and everything is fine at 320, I turn the phone and for some reason it doesn’t get up as it should, like in a browser. Some blocks do not get the desired styles. I can't figure out why.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Enniack, 2015-09-14
@Enniack

Write styles for horizontal screen orientation

@media only screen and (device-width: 320px) and (orientation:landscape) {
   
}

Well, orientation:portrait - vertical

D
deeppines, 2015-09-15
@LucasKane

Screen resolution and workspace are not always the same, most likely the width of the iPhone's workspace, when rotated, does not match the given width in your style.
Try to find out the width of the working area or pick it up using the scientific poke method.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question