Solved

Need Sidebar to Scroll on Overflow

Posted on 2015-02-20
2
97 Views
Last Modified: 2015-02-22
We have a method of inflating ePubs and then driving the content in the /ops/xhtml  directory of the book to the web through an iFrame. another model grabs the toc.ncx file, and builds at TOC navigation list to pass to the view/sidebar. There are 20 different reason why this is not working well and is a "bad practice" and were going to re-model the delivery/views soon.

Meanwhile I would like help just to get the side bar (which is now "sticky" to the top of the browser window) to scroll on overflow, and for the bottom of the TOC to end above the footer. I tried adding "overflow: scroll"  to the inner most container and also to the  parent(s) in the DOM, but "no joy"  So, this view is deprecated but in the meantime I would like to have this working until we get the new model/views/delivery mechanism built.
0
Comment
Question by:Brahmanatha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 17

Accepted Solution

by:
bigeven2002 earned 500 total points
ID: 40622621
Hello,
Someone posted a jsfiddle that had similar results.  I had trouble translating it but hopefully it will work for you.

HTML
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<link href="test3.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="wrap">
    <div class="navbar-fixed-top">
        <div>
                Header
        </div>
    </div>
    <div class="no-padding header-margin">
        <div class="sidebar-nav">
            <ul>
                <li>Sidebar</li>
                <li><a href="#">Link</a></li>
                <li><a href="#">Link</a></li>
                <li><a href="#">Link</a></li>
                <li><a href="#">Link</a></li>
            </ul>
        </div>
    </div>
</div>
<div id="footer"><div class="container"><p>Footer</p></div></div>    
</body>
</html>

Open in new window


CSS
@charset "utf-8";
html, body { height: 100%; margin:0; padding:0; }
#wrap { min-height: 100%; height: auto !important; height: 100%; margin: 0 auto -60px; }
#footer { height: 60px; width:100%; background-color: #f5f5f5; }
#wrap > .container { padding-top: 60px; }
.container { margin: 20px 0; }
.no-padding { padding: 0; }
.header-margin { padding-top: 52px; }
.navbar-fixed-top{ background-color: #f5f5f5; width:100%; height:50px; }
.navbar-fixed-top, #footer, .sidebar-nav{ position:fixed; }
.sidebar-nav{ top:50px; bottom:60px; width:250px; overflow-y:scroll; }

Open in new window

0
 

Author Closing Comment

by:Brahmanatha
ID: 40624947
Thanks for the suggestion. Overflow-y helped, but there was a lot more involved to get this to work properly in our DOM.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question