Given some text that occupies about 10 rows, how can I resize its container to only show the first 3 rows and hide the others? Apparently this works, but I think it is not relia
If you are going to use this you should ensure the line-height is always 2.5ex
line-height
.container { line-height: 2.5ex; height: 7.5ex; /* 2.5ex for each visible line */ overflow: hidden; }
Demo