I am writing a dynamic application, and one problem is that I have the text contained inside the div and the browsers behave funny when the size of the div is too small to contain the text.
Is there a way to make text “trim” in CSS? Any text that does not fit is deleted.
Use overflow: hidden
overflow: hidden
Have you tried overflow: hidden;?
overflow: hidden;
, CSS- ( ). CSS3, text-overflow: ellipsis, '& hellip;' . , Firefox , . , Firefox, .
text-overflow: ellipsis
:W3C ( )Firefox
/*ellipsis stuff*/ white-space: nowrap; overflow: hidden; text-transform: none; text-overflow: ellipsis; /* IE 6+, FF 7+, Op 11+, Saf 1.3+, Chr 1+*/ -o-text-overflow: ellipsis; /* for Opera 9 & 10 */ -ms-text-overflow: ellipsis; /*IE 8*/
obs: also set the width to your preferred size
Source: https://habr.com/ru/post/1777496/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1777491/passing-variables-to-a-jruby-application-via-tomcat-config&usg=ALkJrhh0gND0F0lvtJz8cHU6XGwzlvWWCALoading data into a global temporary table - sqlWhat is the latest version of the Tomcat plugin for Eclipse? - eclipseFix conflicting types in C # .NET caused by ILMerge - c #UILabel text with multiple font colors - iosMap function in C ++ with templates - c ++JSF - creating a dynamic menu using AJAX and selectOneListbox - ajaxIs there a standard pointer size declaration? - cКто-нибудь знает хороший быстрый и грязный синтаксический анализатор текста/грамматики? - parsingarranging list items in two side unordered lists - htmlAll Articles