Wrap Bootstrap navbar list items around centered brand image

后端 未结 1 354
滥情空心
滥情空心 2021-01-27 10:17

Ive been messing with this all night with no solution. I am using bootstrap 2.32 (for a joomla template, not support BS3 yet), and I will have a dynamic number of list items. I

相关标签:
1条回答
  • 2021-01-27 10:45

    You could just move the image into the center of the list, either with the backend or with javascript:

    <script>
    var $nav = $('.nav li');
    var $middle = $nav.eq(Math.ceil($nav.length/2));
    var $liWrappedImg = $('<li></li>').append($('.brand'));
    $middle.before($liWrappedImg);
    </script>
    
    0 讨论(0)
提交回复
热议问题