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

107
Views
Is there a way to apply css class only to the current element without affecting it's children or content?
     <q-carousel-slide
       class="black-bg"
       :name="1"
       img-src="https://cdn.quasar.dev/img/mountains.jpg"
     >
       <div class="text-h5 text-white">Lacak Posisi Anda</div>
     </q-carousel-slide>

I want to apply class black-bg only to q-carousel-slide without affecting the div.

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

If the div has a transparent or translucent background, or if it inherits its background from its parent, then nothing you can do to the q-carousel-slide element will change that.

If the stylesheet (or JavaScript) has rules which target descendants or children of elements which are members of a particular class, then nothing you can do to the HTML will change that.

(Obviously, moving the div so it to somewhere where it won't be affected by the above would work, but I doubt that's an option for you).

about 4 years ago · Santiago Gelvez 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!