[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Need Sidebar to Scroll on Overflow

Posted on 2015-02-20
2
Medium Priority
?
100 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 1000 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

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

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

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.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

656 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