Home > Mobile >  No ellipsis is being shown when text overflowing
No ellipsis is being shown when text overflowing

Time:11-18

I am trying to add ellipsis whenever text is overflowing, for some reason it wont show. What am I doing wrong?

.test {
  width: 100px;
  overflow: hidden;
  white-space: nowrap;
}

.text {
  text-overflow: ellipsis;
}
<div >
  <div >
    dwada wad kowda dwak waodk
  </div>
</div>

CodePudding user response:

The properties that make ellipsis appear need to be in the element you want them to show

.test {
  width: 100px;
}

.text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
<div >
  <div >
    dwada wad kowda dwak waodk
  </div>
</div>

  •  Tags:  
  • css
  • Related