Solved

Need Sidebar to Scroll on Overflow

Posted on 2015-02-20
2
96 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

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
What cart is this? 2 53
WordPress Creating scrolling box at top of page 1 29
Anchor Bookmark 6 31
Dropdown animation to normal dropdown 6 25
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

738 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