With css overflow: hidden
.
Clipping text to a DIV in CSS
-
24-06-2022 - |
سؤال
What's the best way to clip text to a DIV in CSS? For example, to clip the word 'TESTING' to the DIV as shown below. Currently, the text extends past the end of the DIV, despite the DIV height being less than the text height.
المحلول
لا تنتمي إلى StackOverflow