html - Bootstrap fully 100% height with a sidebar -
i can not understand why height of sidebar on right, not 100%, , when scroll down page, background interrupted.
<nav id="nav" class="nav-primary hidden-xs nav-vertical"> <ul class="nav affix-top" data-spy="affix" data-offset-top="50"> <li><a href=""><i class="icon-user"></i> Профиль</a></li> <li><a href=""><i class="icon-bar-chart"></i> Финансы</a></li> <li><a href=""><i class="icon-sitemap"></i> Товары</a></li> <li><a href=""><i class="icon-signal"></i> Товары (статистика)</a></li> <li><a href=""><i class="icon-envelope-alt"></i> Уведомления (10)</a></li> </ul> </nav>
life example here
a couple things.
- you have 2
position
properties set in css#nav
. - you should have one, , should
position:fixed
- there no need
top: 0; left: 0
,bottom: 0;
if object 100% height , fixed top left, touch bottom.
css should be:
#nav { position:fixed; width: 200px; z-index: 1000; left: 0; top: 0; border-right: 1px solid #162636; height: 100%; }
Comments
Post a Comment