?
Solved

Need Sidebar to Scroll on Overflow

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

Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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?
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

765 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