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

105
Views
Using Scroll on bootstrap

I want to implement scroll in bootstrap on my child component (ProductList.vue). Can anyone help me how to paste the code in boostrap 5? I've looked for the problem but haven't found it yet. This is my bootstrap 5 code on child component (ProductList.vue)


    <template>
        <div class="row d-flex justify-content-center">
          <div
            class="card text-center card-wrapper"
            style="width: 18rem"
            v-for="product in products"
            :key="product.item"
          >
            <img class="p-2" style="max-height:200px; height:100%" :src="product.imgUrl" alt="product.title" />
            <div class="card-body ">
              <h5 class="card-title text-truncate">{{ product.title }}</h5>
              <p class="card-text">$ {{ product.price }}</p>
              <a href="#" class="btn btn-primary">Add to cart</a>
            </div>
          </div>
        </div>
    </template>
    
    <script>
    import products from "../item/product.json";
    export default {
      name: "ProduckList",
      data() {
        return {
          products,
        };
      },
    };
    </script>
    
    <style scoped>
        .card-wrapper {
          background-color: rgb(149, 211, 247);
        }
    </style>

this is on parent component (App.vue)


    <template>
      <Header />
        <div class="row">
          <div class="col-8">
              <produck-list />
          </div>
          <div class="col-4">
            <Cart />
          </div>
      </div>
    </template>
    
    <script>
    import Header from "./components/Header.vue";
    import ProduckList from "./components/ProductList.vue";
    import Cart from "./components/Cart.vue";
    export default {
      components: {
        Header,
        ProduckList,
        Cart,
      },
    };
    </script>
    
    <style>
      body {
            background-color: rgb(13, 30, 37)!important;
          }
    </style>

I want the results of cards to be scrollable like this https://getbootstrap.com/docs/5.0/utilities/overflow/

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

0

It seems that you haven't added the overflow-auto short hand to your top div, perhaps editing your top div as follows may help.

<div class="row d-flex justify-content-center overflow-auto">

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!