Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

191
Views
When i change the shape of navbar, the edges are cut

I don't know why, when I declare a border shape different from square the edges are cut: enter image description here

Here's the html template:

  <template>
<div class="navbar-container rounded-pill">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
  <div class="container-fluid">
    <a class="navbar-brand" href="#"></a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>
    <div class="collapse navbar-collapse" id="navbarNav">
      <ul class="navbar-nav mx-auto">
        <li class="nav-item text-center">
          <a class="nav-link" href="#">111</a>
        </li>
        <li class="nav-item text-center">
          <a class="nav-link" href="#">222</a>
        </li>
        <li class="nav-item text-center">
          <a class="nav-link" href="#">333</a>
        </li>
        <li class="nav-item text-center">
          <a class="nav-link" href="#">444</a>
        </li>
        
      </ul>
    </div>
  </div>
</nav>
</div>    
</template>

and heres the css:

  <style scoped>
@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');
.navbar-container {
    box-sizing: border-box;
    margin: 0.5rem;
    height: 100%;
    width:60%;
    border: 2px solid red;
    margin-left: 20%;
    background-color: transparent;
}

nav {
    background-color: white !important;
    font-size: 1.3rem !important;
}

 nav ul li a {
     padding-inline: 1rem !important;
 }

</style>

I want a pill-rounded shape of the navbar, when the shape is square, everthing works fine, i just want to change and i couldnt though bootstrap classes and css border radius

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try to also set rounded-pill on navbar class, or you can set the same border-radius to navbar-container and navbar classes without rounded-pill:

new Vue({
  el: '#demo',
})
.navbar-container {
  box-sizing: border-box;
  margin: 0.5rem;
  height: 100%;
  width: 60%;
  border: 2px solid red;
  margin-left: 20%;
  background-color: transparent;
  border-radius: 1em;
}
.navbar {
  border-radius: 1em;
}
nav {
  background-color: white !important;
  font-size: 1.3rem !important;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<div id="demo">
  <div class="navbar-container">
    <nav class="navbar navbar-expand-lg navbar-light bg-light">
      <div class="container-fluid ">
        <a class="navbar-brand" href="#"></a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
           <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNav">
          <ul class="navbar-nav mx-auto">
            <li class="nav-item text-center">
              <a class="nav-link" href="#">111</a>
            </li>
            <li class="nav-item text-center">
              <a class="nav-link" href="#">222</a>
            </li>
            <li class="nav-item text-center">
              <a class="nav-link" href="#">333</a>
            </li>
            <li class="nav-item text-center">
              <a class="nav-link" href="#">444</a>
            </li>
          </ul>
        </div>
      </div>
    </nav>
  </div> 
</div>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!