Search code examples
csstextoverflow

CSS stop text overflowing


I'm writing a dynamic application and one problem I have is that I have text contained inside a div, and browsers behave funny when the size of the div is too small to contain the text.

Is there anyway to make the text 'cutoff' in CSS? Any text that doesn't fit, is removed.


Solution

  • Use overflow: hidden