Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed header before scrollbar #289

Open
bartrylant opened this issue Jul 30, 2017 · 2 comments
Open

Fixed header before scrollbar #289

bartrylant opened this issue Jul 30, 2017 · 2 comments

Comments

@bartrylant
Copy link

I want to use sidebars with a fixed header. Followed these instructions (https://www.adchsm.com/slidebars/help/advanced-usage/elements-with-fixed-positions/). The header is fixed, but it appears in front of the scrollbars. Also, the width is set to exact window size, instead of the window size minus the width of the scrollbars. This causes alignment issues if you center content on the page, and content inside the fixed header.

@Anke
Copy link

Anke commented Aug 10, 2017

My page structure looks like this, the wrapper div given by the CMS.

<!doctype html>
<html>
  <head>...</head>
  <body>
    <div id ="wrapper">
        <header id="header" canvas=""></header>
        <div canvas="container"></div>
        <div off-canvas="id-1 right push"></div>
        <footer id="footer" canvas=""></footer>
    </div>
  </body>
</html>

The header has a fixed position. Header and footer are pushed aside as they should. However I need to override body, html { overflow: hidden; } to auto, as otherwise the page can't be scrolled. Setting #wrapper to overflow: auto doesn't show any effect, and [canvas="container"] { overflow-y: auto } isn't working either.

On the other hand it's semioptimal showing a scrollbar for the content and second one for the navigation ...

Edit: so, now I chose the above structure, set body, html { overflow: hidden; min-height: 100%; } and it seems to work just fine.

@jackvial
Copy link

jackvial commented Nov 5, 2017

I had to increase the z-index on my fixed element, and its working fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants