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

266
Views
Page break inside <p> tag when content overflow happen

p {
  width: 350px;
}
<p>
  <span class="c-1">Span-1 content goes here..</span> | <span class="c-2">Span-2 content goes here..</span>
</p>

View:

Span-1 content goes here.. | Span-2 content goes here..

This works fine, when the 1st span tag's content is less, But when the content increases need a line break like and have to hide the separator (i,e | ).

Span-1 more and more content goes here..
Span-2 content goes..

What's the better way to achieve this ??

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

0

Couldn't you do this via using a display: none/block media query on a br element?

.br { display: none; }

@media screen and (min-width: 768px) {
  .br{ display: block; }
}
<p>
  <span>Yo this is a</span>
  <br class="br">
  <span>full sentence</span>
</p>

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!