Commit 6908538d authored by key-amb's avatar key-amb
Browse files

Fix #12

parent c1b54635
......@@ -190,7 +190,6 @@ main > article > section > table > tbody > tr:nth-of-type(odd) {
*/
div#sidebar {
position: fixed;
}
/* Sidebar modules for boxing content */
......
......@@ -6,9 +6,12 @@ window.onload = function() {
var totalHeight = headHeight + mainHeight + footHeight;
var w = $(window);
if (sideHeight > 0 && sideHeight < mainHeight) {
if ( w.width() > $("main").width() + $("#sidebar").width()
&& sideHeight > 0
&& sideHeight < mainHeight ) {
$(".doc-sidebar").css("height", mainHeight);
var sideNode = $("#sidebar");
sideNode.css({"position": "fixed"});
var scrollStart = 0;
var scrollStop = headHeight + mainHeight - sideHeight;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment