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

155
Views
how to apply css ::before last word

Is there any possibilities to apply different background colour for ::before last word eg : `

<style>
.test::before{
  content : 'stack overflow';
  color: red;
}
</style>
<p class="test"></p>

` In this above mentioned example, I want add different colour for "overflow" text, any idea ?

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

0

To render the output you want to visualize, this could be a way:

.test::before {
  content: 'stack';
}
.test::after {
  content: ' overflow';
  color: red;
}
<p class="test"></p>

But It's not appropriate. If your content is just decorative, why don't you put it into a <span>?

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!