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

137
Views
css content element not showed in if display=flex

I have a line describing the full company address. It is made with different pieces

<div><b>COMPANY</b>&nbsp;•&nbsp;Address,&nbsp;City&nbsp;•&nbsp;VAT 12345678901</div>

In a large screen the div is displayed as one long line:

COMPANY • Address line, City • VAT 12345678901

But on a small mobile device it is displayed on three lines:

     COMPANY • 
Address line, City • 
  VAT 12345678901

My goal is to remove the bullets on the small devices. To accomplish the goal, I defined a span element as follow:

.bg99 .footer-divider {
    content: "&nbsp;•&nbsp;";
}
@media only screen and (max-width: 768px){ 

    .bg99 div.company div {
        flex-direction: column;    
    }
    .bg99 .footer-divider {
        content: "&nbsp;&nbsp;"
    }
    
  }

and changed the line as follow:

<div><b>COMPANY</b><span className="footer-divider"/>Address,&nbsp;City<span className="footer-divider"/>VAT 12345678901</div>

But the result is that the bullets disappeared on both devices.

Inspecting the browser, I see the CSS class footer-divider and the content

.bg99 .footer-divider {
    content: "&nbsp;•&nbsp;";
}

But the bullets are not visible on the screen. It looks like the rule should not applied.

Any idea?

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

0

I think first you need to replace "className" with "class" in your html markup

Try below code that might help

HTML

<div class="bg99">
<b>COMPANY</b>
<span class="footer-divider">Address,&nbsp;City</span>
<span class="footer-divider">VAT 12345678901</span>
</div>

CSS

@media only screen and (max-width: 768px){

    .bg99 div.company div {
        flex-direction: column;    
    }
    
    .bg99 .footer-divider::before{
        content: "*"
    }
    
  }
  
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!