I'm trying to fix bootstrap scrollspy on my website in some browsers. I found (and already saw a lot of discussions) that scrollspy doesn't work somewhere because of height 100% on body element.
I've created simple webpage with this problem (works well in Opera 20, doesn't work for example in Firefox 7). When I remove body height 100% everything works. Problem is that i need to have 100% height of body. Is there some workaround? Any idea how to fix it and keep 100% height of body element? Thanks!
jsfiddle.net example: http://jsfiddle.net/eedZL/
CSS:
*{width:0;margin:0;}
html,body{width:100%;height:100%;}
.promo{width:100%;height:100%;background:#ccc;text-align: center;}
.slide{width:100%;height:500px;background:#333;}
.navigation{position:fixed;width:400px;height:300px;background:#fff;right:20px;top:20px;}
.navigation ul li{list-style-type: none;width:200px;}
.navigation ul li.active{color:red;background: #ccc;padding:10px;}
HTML
...
<body data-spy="scroll" data-target=".navigation">
<div class="promo" id="home">Some welcome screen</div>
<div class="slide" id="first">Slide #1</div>
<div class="slide" id="second">Slide #2</div>
<div class="slide" id="third">Slide #3</div>
<div class="navigation">
<ul class="standard-nav nav nav-tabs">
<li><a class="scrolling-nav" href="#home">Welcome screen</a></li>
<li><a class="scrolling-nav" href="#first">First slide</a></li>
<li><a class="scrolling-nav" href="#second">Second slide</a></li>
<li><a class="scrolling-nav" href="#third">Third slide</a></li>
</ul>
</div>
</body>
...
JS
$(document).ready(function(){
$('body').scrollspy({ target: '.navigation', offset: 100});
});