Bootstrap 3.0 affix with list changes width

前端 未结 9 1663
一向
一向 2021-02-01 14:56

I\'m migrating to bootstrap 3.0.0 and I\'m having issues with an affixed menu to the left: as soon as it becomes affixed (after 10px scroll), its width changes. In this fiddle i

9条回答
  •  后悔当初
    2021-02-01 15:46

    I had the same problem and fixed with this:

     $(window).resize(function () {
                    $('#category-nav.affix').width($('#content').width());
                });
    

    basically in an event of resize I calculate the content div's width and set the width of affixed element to that.

提交回复
热议问题