javascript - Bootstrap Affix Not Moving -
i'm trying make navigation sidebar on website move down browser view via bootstrap's affix plugin refuses follow view , stays @ top.
this structure have html:
<div id="page-wrapper"> <div class="container"> <div class="row"> <div id="navigation-affix" data-spy="affix" data-offset-top="20" data-offset-bottom="200"> <div class="col-xs-2" id="navigation-wrapper"> <div class="inner"> <div class="row"> <div class="col-xs-12"> <img src="images/me.png" alt="liam potter" id="picture-me" class="img-responsive"> </div> </div> <div class="row"> <div class="col-xs-12"> <div id="navigation"> <a href="/" id="current-page">home</a> <a href="/portfolio">portfolio</a> </div> </div> </div> </div> </div> </div> <div class="col-xs-10" id="content-wrapper"> <div class="inner"> </div> </div> </div> </div> <div id="page-push"></div> </div> <footer> <div class="container"> </div> </footer>
source: https://jsfiddle.net/tbejd5en/1/
any thoughts?
you can add position:fixed
id #navigation-affix
, add col-xs-offset-2
id #content-wrapper
div#navigation-affix { position: fixed !important; }
here fiddle: https://jsfiddle.net/tbejd5en/5/
Comments
Post a Comment