monstro monstro - 5 months ago 45
CSS Question

CSS style to truncate long text doesnt work

I need page title to be truncated with ellipsis if it is longer than the availbale space.

Demo - short title:

enter image description here

Demo - long title (css styling doesnt work):

enter image description here

All comments saying to add width - doesnt work either

enter image description here


add your ellipsis styling to the .navbar-header instead, you also need to define a width or max-width, you can see this working on my codepen

alternatively you can add width or max-width to the .navbar-title but as its an inline element you will need to change the display to inline-block too I believe.