0

I have this html output:

  return '<div class="band"><i class="'.USER.'" aria-hidden="true"></i> '.(isset($_SESSION['logedAs'])? $_SESSION['logedAs'] : null).' <i class="'.$icon.' ribbon" aria-hidden="true"></i> '.$ribbon.'</div>';

and i need to add brake before icon with class 'ribbon'. I tried with this in CSS but it won't work:

.ribbon span::before { 
        content: "\A";
        white-space: pre;;
}
Klapsius
  • 3,273
  • 6
  • 33
  • 56

1 Answers1

2

I guess you can insert a block content before the icon to break it down:

.ribbon:before {
  content: "";
  display: block;
}
<div class="band">
  <i class="" aria-hidden="true">icon1</i> Some text
  <i class=" ribbon" aria-hidden="true">icon2</i> $ribbon
</div>
AVAVT
  • 7,058
  • 2
  • 21
  • 44