I
I
Ily4farmer2020-06-03 23:45:15
css
Ily4farmer, 2020-06-03 23:45:15

Why is the site walking on mobile screens?

I decided to practice layout for mobile devices, made up the whole layout and ran into the following problem.
When the site is on the desktop in the browser, everything looks right
5ed809fb6b43f845138950.jpeg
And it even adapts normally to the size of the screens
5ed80a4e3ba24415803912.jpeg
But as soon as I decide to switch to any mobile version (iphone x for example), everything immediately becomes incomprehensible
5ed80b0251538218233923.jpeg
If I press any button, the site gets up as it should, but at the same time I can move the site itself to the left
5ed80b9761eaf914041309.jpeg
How to fix this?
Here is the code https://jsfiddle.net/ily4famer/hmt21wzk/1/

Answer the question

In order to leave comments, you need to log in

4 answer(s)
X
xdevelx, 2020-06-04
@Ily4farmer

@media (max-width: 730px) {
  .team-people {
    width: 700px;
  }
}

That's why 700px for mobile?
And right away
.team-people {
    width: 785px;
}

And in the same steppe
.portfolio-form {
    width: 510px;
}

If you really really need to limit the width, then you need to set max-width and you won’t break the layout.

Y
YouFire, 2020-06-04
@YouFire

Because you may have something out of scope, just delete everything until it happens, how do you delete that div and you won’t walk, restore the code and work with the broken div class

O
Olegarh1a, 2020-06-04
@Olegarh1a

Wanted to help saw the structure

<header class="header">
        <div class="container">
            <div class="header-block">
                <div class="header-logo">
                    <div class="header__img">
                        <img src="img/logo.png" alt="BAK-ONE">
                    </div>
                    <div class="header__text">
                        <!-- /.header__logo -->
                        <div class="header__title">BAK-ONE</div>
                        <!-- /.header__title -->
                        <div class="header__subtitle">One Page Flat Template</div>
                        <!-- /.header__subtitle -->
                    </div>
                    <!-- /.header-text -->
                </div>
                <!-- /.header-img -->

closed immediately

L
labunskyi, 2020-07-01
@labunskyi

if the screen "walks", most likely some element has padding set, which pushes it out of the screen.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question