Sermed mayi
Sermed mayi

Reputation: 757

Vue : How to fix navbar on top inside bootstrap container class

I have this vue app.js template :

<template>
  <div id="app" class="container shadow px-0">
      <NavBar/> 
      <Slider/> 
  </div>
</template>

the navbar component is inside div class with top-fixed with bootstrap :

<div class="fixed-top">
   <div></div>
   <nav></nav>
</div>

i want to display the navbar menu with container width but when I add fixed-top it will take 100% of screen like this image :

enter image description here

Upvotes: 0

Views: 708

Answers (1)

Sermed mayi
Sermed mayi

Reputation: 757

I solved it by add this to fixed-top div :

 <div class="fixed-top" style="max-width:inherit;margin:auto">

Upvotes: 1

Related Questions