Answer the question
In order to leave comments, you need to log in
Why is string trim not working in chrome?
Why is this code not working and how to make it work in chrome? link to codepen
<div class="container">
<ul class="list">
<li class="item"><a href="#" class="text">some text</a></li>
<li class="item"><a href="#" class="text">some text</a></li>
<li class="item"><a href="#" class="text">some text</a></li>
</ul>
</div>
.container {
width: 100px;
}
.list {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item {
display: inline-block;
}
.text {
display: block;
}
Answer the question
In order to leave comments, you need to log in
Because for some reason you made the links a block.
codepen.io/anon/pen/ZQrbLL
What is the meaning of pruning?
I guess that the point is that you are trying to cut not the text itself (i.e. li element), but the block.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question