How can the text be limited in one line?


  • QA Engineer

    I need to make sure there's a maximum of 20 symbols in the row, then the row's moving. Like,

    <td colspan="3" class="user_text" style="word-wrap: break-word">
      {$item.review|strip_tags|truncate:500}
    </td>
    

    She's using the maximum now. Width doesn't work. Thank you.



  • How to use a unit of measure ch https://developer.mozilla.org/en-US/docs/Web/CSS/length

    This unit represents the width, or more precisely the advance measure, of the glyph '0' (zero, the Unicode character U+0030) in the element's font

    div {  
      max-width: 20ch;
    }
    <div>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deserunt rem odit quis quaerat. In dolorem praesentium velit ea esse consequuntur cum fugit sequi voluptas ut possimus voluptatibus deserunt nisi eveniet!Lorem ipsum dolor sit amet, consectetur
      adipisicing elit. Dolorem voluptates vel dolorum autem ex repudiandae iste quasi. Minima explicabo qui necessitatibus porro nih</div>




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2