{"id":20,"date":"2015-09-10T23:21:48","date_gmt":"2015-09-10T17:51:48","guid":{"rendered":"http:\/\/madhurendra.com\/?p=20"},"modified":"2015-09-10T23:21:48","modified_gmt":"2015-09-10T17:51:48","slug":"adding-ellipsis-to-long-text","status":"publish","type":"post","link":"https:\/\/madhurendra.com\/adding-ellipsis-to-long-text\/","title":{"rendered":"Adding ellipsis to long text"},"content":{"rendered":"
When you have some long division and you don’t want to wrap text or extend size of div, But instead you want to use add few `…` at end of text using CSS<\/p>\n
.wrapped{\r\noverflow:hidden;\r\nwhite-space: nowrap;\r\ntext-overflow: ellipsis;\r\nwidth: 300px;\r\n}<\/pre>\nExample :<\/p>\n
Text without text-overflow :Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla id sem vehicula, faucibus leo id.<\/span><\/p>\n
Text with text-overflow : Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla id sem vehicula, faucibus leo id.<\/div>\n","protected":false},"excerpt":{"rendered":"When you have some long division and you don’t want to wrap text or extend size of div, But instead you want to use add few `…` at end of text using CSS .wrapped{ overflow:hidden; white-space: nowrap; text-overflow: ellipsis; width: 300px; } Example : Text without text-overflow :Lorem ipsum dolor sit amet, consectetur adipiscing elit. … <\/p>\n