# Whole page jumps when switching tabs in a page master controlled set up: SOLVED

**URL:** https://forum.pinegrow.com/t/whole-page-jumps-when-switching-tabs-in-a-page-master-controlled-set-up-solved/4179
**Category:** Support Forum Feedback
**Created:** [May 25, 2020, 8:48pm UTC](https://forum.pinegrow.com/t/whole-page-jumps-when-switching-tabs-in-a-page-master-controlled-set-up-solved/4179 "2020-05-25T20:48:59Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![droidgoo](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/droidgoo/32/2209_2.png) [@droidgoo](https://forum.pinegrow.com/u/droidgoo)
#### Post date: [May 25, 2020, 8:48pm UTC](https://forum.pinegrow.com/t/whole-page-jumps-when-switching-tabs-in-a-page-master-controlled-set-up-solved/4179/1 "2020-05-25T20:48:59Z")

</div>

Using index.html as my master page with the nav menu and just noticed the webpage jumps a few px to the right on certain pages.

Tried using update components to ensure all pages are based on the same master page, but it still does this behavior.

Anyone have experience tracking this kind of thing down, or any clue as to what might be causing it?

the first pic is normal with the edge of the window for reference

![Capture](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/0/08cedc69106bb16491f8d7d3df0d6e9314cd9565.jpeg)

the 2nd pic shows the whole page jumps over 10-15px  
 ![Capture2](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/4/425d632ddbda569a2af454ba1e012d0467f23fdb.jpeg)

the behavior does not manifest in PG but shows up on the hosted page viewed with Fire Fox

> **[Justice in Society - Government vs Corporation](http://putpeopleoverprofit.org)**
>
> Credo for a system of government that empowers the PEOPLE to determine what is a just society, rather than corporations and the wealthy.

switch between “info” tab and the sub tab “reading” to see the jump, then if you click on any of the buttons, it will jump back into place even tho it’s the same page.

also does this between the “umbrella” tab and either the “vetting” or “debates” tab

but all the other tabs and pages seem fine.

i guess i can live with it, but i’m stumpped

---

<div class="post-metadata">

### Author: ![droidgoo](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/droidgoo/32/2209_2.png) [@droidgoo](https://forum.pinegrow.com/u/droidgoo)
#### Post date: [May 26, 2020, 2:48am UTC](https://forum.pinegrow.com/t/whole-page-jumps-when-switching-tabs-in-a-page-master-controlled-set-up-solved/4179/2 "2020-05-26T02:48:46Z")

</div>

now the info tab is doing it too…all the other menu items are fine but when i click on the inform menu it jumps… this i really weird, it’s spreading like a virus.

maybe they will ALL get infected and solve my problem that way 😉

i’ll even throw another bit of weirdness on the pile, when i right click in FF to do “inspect element” using the developer view… it shifts back to where it’s supposed to be

am i crazy, can anyone else confirm this behavior?

---

<div class="post-metadata">

### Author: ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)
#### Post date: [May 26, 2020, 9:46am UTC](https://forum.pinegrow.com/t/whole-page-jumps-when-switching-tabs-in-a-page-master-controlled-set-up-solved/4179/3 "2020-05-26T09:46:43Z")

</div>

Hi @droidgoo,  
I took a look at your pages in both FF and Chrome. While I see what you mean about content placement on the screen for the different pages, I wasn’t able to replicate the jumping after selecting “inspect element”. However, when I open the URL with Pinegrow, it looks the same.

If you look at the “Inform” page the left edge matches up with the double greater-than of your breadcrumbs. When you go to the reading page, the content jumps to the right. Inspecting the “.main-content” on both pages shows equal margins and padding. However, if you look at the `<figure>` within that div on the reading page (class=“table5”) you can see that there is 24px of margin on the left and right sides. In contrast, no margin is added to the content of the inform page. So your jump is that 24px of margin - I think the screen references maybe make it look more prominent in the browser than in Pinegrow?  
Hope this helps,  
Bob

---

<div class="post-metadata">

### Author: ![AllMediaLab](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/allmedialab/32/2079_2.png) [@AllMediaLab](https://forum.pinegrow.com/u/AllMediaLab)
#### Post date: [May 26, 2020, 11:31am UTC](https://forum.pinegrow.com/t/whole-page-jumps-when-switching-tabs-in-a-page-master-controlled-set-up-solved/4179/4 "2020-05-26T11:31:35Z")

</div>

` <! twitter card BEGIN >`

`<! twtter care END>`

Are you sure it’s not just the wrong comments you made on all pages!

Must be:

` <!-- twitter card BEGIN-->`

`<!-- twitter card END-->`

---

<div class="post-metadata">

### Author: ![Thomas](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/thomas/32/61_2.png) [@Thomas](https://forum.pinegrow.com/u/Thomas)
#### Post date: [May 26, 2020, 2:28pm UTC](https://forum.pinegrow.com/t/whole-page-jumps-when-switching-tabs-in-a-page-master-controlled-set-up-solved/4179/5 "2020-05-26T14:28:44Z")

</div>

Hi guys,

if your asking me (which you never should), “jumping” is caused by side-scroll at specific page-widths. Theoretically, if you change the @media queries (in the menu000.css) to a higher number (as in the code below), side-scroll disappears:

```
/* ======= RESPONSIVE ======== */
@media (min-width: 700px) {
#tmm {
    display: none;
}

.menu {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    grid-template-areas: 'logo title' 'nav nav';
}

.burger {
    display: none;
}

.logo {
    grid-area: logo;
}

.banner {
    grid-area: title;
    width: 330px;margin: 0px !important;
}

.main-menu {
    grid-area: nav;
    display: flex;
    justify-content: space-evenly;
}

.menu-item {
    display: flex;
    position: relative;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: space-between;
}

.toggle:checked ~ .sub-menu {
    display: block;
    position: absolute;
    top: 100%;
    z-index: 1;
}
}

@media (min-width: 1100px) {
.menu {
    display: grid;
    grid-template-columns: auto auto 1fr;
    grid-template-rows: auto;
    grid-template-areas: 'logo title nav';
}
}

```

Reason being, that things appear later (from the min side) or earlier (if you see it from the max side). Just a guess though.

Cheers

Thomas

---

<div class="post-metadata">

### Author: ![droidgoo](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/droidgoo/32/2209_2.png) [@droidgoo](https://forum.pinegrow.com/u/droidgoo)
#### Post date: [May 26, 2020, 4:45pm UTC](https://forum.pinegrow.com/t/whole-page-jumps-when-switching-tabs-in-a-page-master-controlled-set-up-solved/4179/6 "2020-05-26T16:45:49Z")

</div>

oh, good catch!

thank you for that one… i rely so much on the `ctrl-/` feature of my text editor, i must have done this one by hand 😉 prolly looked up at the doctype and just copied that 🤪

here’s another little twist, when i change this text in my master page, and then use `Update Whole Project` it wipes out all the `<?php` stuff above my `<!DOCTYPE html>` tag in the page that must have the php at the top in order for the `header()` redirect to work.

just a quirk, but an annoying one as i have to remember to paste all the code back in after any kind of site wide component updates from PG.

all that being said, sadly, this easy fix was not the cause of the page jumping, so i must dive deeper into all that margin business.

---

<div class="post-metadata">

### Author: ![droidgoo](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/droidgoo/32/2209_2.png) [@droidgoo](https://forum.pinegrow.com/u/droidgoo)
#### Post date: [May 26, 2020, 7:53pm UTC](https://forum.pinegrow.com/t/whole-page-jumps-when-switching-tabs-in-a-page-master-controlled-set-up-solved/4179/7 "2020-05-26T19:53:01Z")

</div>

thanks for taking the time to look at this, it’s much appreciated.

i tried changing the margins of the `.table5` class to `auto` and also just commenting out the margin and letting the default `<figure>` margins take over but it did not affect the issue.

the issue is more related to the entire page, from `<header>` to `<footer>` and is not limited to the main `<div>`.

but now that i’ve looked at it both ways, i rather like the way that class looks without any margin, thanks again.

---

<div class="post-metadata">

### Author: ![droidgoo](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/droidgoo/32/2209_2.png) [@droidgoo](https://forum.pinegrow.com/u/droidgoo)
#### Post date: [May 26, 2020, 8:31pm UTC](https://forum.pinegrow.com/t/whole-page-jumps-when-switching-tabs-in-a-page-master-controlled-set-up-solved/4179/8 "2020-05-26T20:31:48Z")

</div>

Ah, yes… that’s what it is.

I don’t notice it in PG because there is ALWAYS a vert scroll bar, if i resize my browser really short so there is always a vert scroll bar, the side jumping behavior is eliminated.

it only happens on pages that just so happen to be shorter than the browser window, which is why there seemed to be this random creep in the effect at different times when my browser happened to be a different size.

good call, Thomas.

I looked at ur suggested break points, but that really doesn’t affect the vert scroll which is what the problem was (is).

the first breakpoint is a weirdly specific number, and if i remember right there were conflicting needs within the mobil menu i was trying to balance and wound up there as a compromise.

changing it didn’t break anything obvious, but i’m gonna leave it there until i have time to dive back into the menu code… sleeping dogs and all that.

so long story short, unless i’m willing to pad out my page height so that vert scroll would always be present, i’m just gonna have to live with it.

At least now i know it’s not something i’ve screwed up 🙃

thanks again to you and everyone for taking time to help this inexperienced website maker to learn more of the trade secrets.

this PG forum is way nicer than stack overflow

---

<div class="post-metadata">

### Author: ![droidgoo](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/droidgoo/32/2209_2.png) [@droidgoo](https://forum.pinegrow.com/u/droidgoo)
#### Post date: [May 26, 2020, 9:13pm UTC](https://forum.pinegrow.com/t/whole-page-jumps-when-switching-tabs-in-a-page-master-controlled-set-up-solved/4179/9 "2020-05-26T21:13:13Z")

</div>

to sum up, the issue is related to the presence of the vertical scroll bar along the side of the page when the page height is greater than the view port size.

some of my pages where too short to trigger the scroll bar so when switching to a page that was long enough, this sideways jumping effect could be noticed.

quite common artifact, apparently.

here is a hack i found that i might try

> **[Force Vertical Scrollbar | CSS-Tricks](https://css-tricks.com/snippets/css/force-vertical-scrollbar/)**
>
> html { overflow-y: scroll; } This is invalid CSS, but it works in everything except Opera. The reason for this is to prevent "centering jumps" when
