Answers for "css limit text length"

CSS
3

css limit text length

/*CSS to limit the text length inside a div*/
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
Posted by: Guest on July-01-2020
1

restrict a paragraph height css

.class{
   word-break: break-word;
   overflow: hidden;
   text-overflow: ellipsis;
   display: -webkit-box;
   line-height: 16px; /* fallback */
   max-height: 32px; /* fallback */
   -webkit-line-clamp: 2; /* number of lines to show */
   -webkit-box-orient: vertical;
}
Posted by: Guest on April-08-2020
1

text limit in css

body {
   margin: 20px;
}

.text {
   overflow: hidden;
   text-overflow: ellipsis;
   display: -webkit-box;
   -webkit-line-clamp: 2; /* number of lines to show */
   -webkit-box-orient: vertical;
}
Posted by: Guest on April-08-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