Answers for "css span limit text"

1

span limit text length

<style>
	.text {
  		display: block;
  		width: 100px;
  		overflow: hidden;
  		white-space: nowrap;
  		text-overflow: ellipsis;
	}
</style>
<span class="text">Hello world this is a long sentence</span>
Posted by: Guest on December-14-2020
0

css text limit

p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
Posted by: Guest on May-17-2021

Browse Popular Code Answers by Language