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

Scrolling assumes split-pane occupies full browser window? #5

Closed
janicki opened this issue Jul 26, 2013 · 3 comments
Closed

Scrolling assumes split-pane occupies full browser window? #5

janicki opened this issue Jul 26, 2013 · 3 comments
Assignees
Labels

Comments

@janicki
Copy link

janicki commented Jul 26, 2013

All your demos show the split-pane occupying the whole browser window. I didn't think much of it at the time. For my needs, I have a horizontal banner div at the top of the window and a horizontal split-pane taking up the remainder below. When the content of the split-pane requires scrolling, it never quite reaches the bottom of the content. It seems to be short by the same height as my banner. Any ideas?

@janicki
Copy link
Author

janicki commented Jul 27, 2013

Also FYI, when I simply remove my banner div so that the split-pane occupies the whole window, the scrolling works properly, so I think that makes it unlikely that my setup is the cause.

@janicki
Copy link
Author

janicki commented Jul 28, 2013

After some sleep I realized there is a simple work-around… I just put empty divs at the bottom of each pane's content that are the same height as my top banner. That seems to "trick" the split-pane into scrolling to the bottom of the real content, and only hides the blank filler divs.

@shagstrom
Copy link
Owner

Well, the split pane uses the whole parent (it's on purpose), which could be the browser window.

I your case I would do the following:

<head>
...
<style>
    ...
    .banner {
        height: 2em;
    }

    .content {
        position: absolute;
        top: 2em;
        left: 0;
        bottom: 0;
        right: 0;
    }
    ...
</style>

</head>
<body>
<div class="banner">Some banner</div>
<div class="content">
    <div class="split-pane fixed-top">
        ...
    </div>
</div>
</body>

You can also take a look at https://github.com/shagstrom/split-pane/blob/master/examples/with-banner.html

@ghost ghost assigned shagstrom Jul 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants