Menu pushing content off page #1072
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
|
Hi @fullerpault, thank you for the question. This is Quire functioning as intended. For many standard Quire publications, the width of the text is a bit narrower than what you have here, so the shift effect is less noticeable. The float you are suggesting would be possible with CSS, but that extends beyond my capabilities. Perhaps someone from the community, maybe @daniel-keller, @mpopke, or @1000camels, has suggestions? |
Beta Was this translation helpful? Give feedback.
-
|
You'll probably want to move the side menu down below the top navbar so that the hamburger icon is still visible when the menu is expanded. That way the user can close the menu easily. This means that making this change in custom.css can be a little challenging because you need to know the height of the top nav to push the menu beneath it, and you can do that with CSS custom properties if you want, but it's easier to just edit the layout.scss file where the In and around line 133 of that same file you'll find You can modify .quire__secondary {
height: calc(100vh - $navbar-height); // changes height of sidebar
position: fixed;
top: $navbar-height; // moves sidebar just beneath top nav
right: 0;
overflow-y: scroll; // sidebar scrolls vertically as separate container from main content
overscroll-behavior-y: contain; // prevents sidebar scroll overflow from affecting main content
transform: translateX(100%); // hides sidebar by default
transition-property: transform;
transition-duration: 0.05s;
transition-timing-function: linear; // transition: all 0.05s linear;
width: $quire-menu-width; // explicitly declare sidebar width
max-width: 100vw; // defensive design for mobile to avoid horizontal scrolling on small phones
display: block;
z-index: 100;
…and modify the &.is-expanded {
transform: translate3d(0, 0, 0); // or just translateX(0) should work, too
#site-menu__inner {
display: block;
}
}
That will:
There are definitely other approaches to handling the sidebar menu, and there might be some detail that we've missed with this CSS, but this is what we've been using in our quire publications (credit to @1000camels for the first version of this, which I've only modified a little). |
Beta Was this translation helpful? Give feedback.
-
|
Thank you @daniel-keller and especially @mpopke for your generous support! |
Beta Was this translation helpful? Give feedback.


You'll probably want to move the side menu down below the top navbar so that the hamburger icon is still visible when the menu is expanded. That way the user can close the menu easily. This means that making this change in custom.css can be a little challenging because you need to know the height of the top nav to push the menu beneath it, and you can do that with CSS custom properties if you want, but it's easier to just edit the layout.scss file where the
$navbar-heightvariable is already available.In
content/_assets/styles/layout.scssaround line 107 (in the current version) you'll find the first lines of the declaration for.quire__secondarythat look like this: