1

I have a balise <li> that have a backgroup but the value of the li sometimes is too long .

so I want when the value is too long to show just the begin of the value then some point like that :

112312531821321 =======> 112312531..

Is there an option in CSS or HTML to do this ?

this is my code :

 <ul > 
  <ui:repeat value="#{op.orderedOf}" var="vari" > 
    <li class="item"  ><h:outputText value="#{vari}" /></li>
     </ui:repeat>                     
      </ul>  
Shruti
  • 1
  • 13
  • 55
  • 95
marouanoviche
  • 253
  • 4
  • 11
  • 28

2 Answers2

0

Use CSS ellipsis

Here is the similar question which I answered long ago

Community
  • 1
  • 1
Sowmya
  • 26,684
  • 21
  • 96
  • 136
0

ul li {

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

When can you use it!

http://caniuse.com/#search=ellipsis

SOLUTION FOR OPERA

text-overflow: -o-ellipsis-lastline
Bartek Bielawa
  • 562
  • 4
  • 10