0

text inside {{payment.lastappointment}} if its too long will go beyond the card borders is there any trick to make follow the card borders (text will array in lines when no more width to accommodate the whole text)??

enter image description here

<q-card-section>
    <div class="row  ">
    <div class="col-8 col-shrink "><div style= "min-width: 200px; width: 200px" class="text-container">Work Done: {{payment.lastappointment }}</div></div>
    <div class="col-4"></div>
</div>  <div class="text-caption text-right text-grey">{{paymentdateAdded(payment.paymentdate)}}</div>
      <div  v-if="$q.screen.gt.xs">

   <div><q-badge   color="green"  >Money Paid: {{formatPrice(payment.moneypaid)}} {{payment.currencypaid}}</q-badge></div>
   <div><q-badge  color="orange"  >Total To Pay: {{formatPrice(payment.moneyhavetopay)}} {{payment.currencyhavetopay}}</q-badge></div>
    </div>
     <div  v-else>
     <div><q-badge color="green"  >Paid: {{formatPrice(payment.moneypaid)}} {{payment.currencypaid}}</q-badge></div>
   <div><q-badge  color="orange"   >Total: {{formatPrice(payment.moneyhavetopay)}} {{payment.currencyhavetopay}}</q-badge></div>
  </div>
  </q-card-section>
omar jasim
  • 21
  • 5

1 Answers1

0

Just trying to understand the use case of inner div element <div style= "min-width: 200px; width: 200px" class="text-container">. We can remove this element as this is the only div element available under col-8. Which results in resolve the issue.

Demo :

body { padding: 20px; }
.container {
  padding-right: 15px;
  padding-left: 15px;
}
[class*="col-"] {
  padding-top: 15px;
  padding-bottom: 15px;
  background-color: #eee;
  background-color: rgba(86,61,124,.15);
  border: 1px solid #ddd;
  border: 1px solid rgba(86,61,124,.2);
  font-size: 11px;
}
<div class="container">
  <div class="row">
    <div class="col-md-8">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
  </div>
</div>
Debug Diva
  • 26,058
  • 13
  • 70
  • 123
  • I got it but when I use texts from {{payment.lastappointment}} it is behaving different from normal text( not seem to be contained with the borders) so any idea? – omar jasim Jun 04 '22 at 21:48