Solved

Need Sidebar to Scroll on Overflow

Posted on 2015-02-20
2
92 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
2 Comments
 
LVL 17

Accepted Solution

by:
bigeven2002 earned 500 total points
Comment Utility
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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now