Use ellipsis for topic title to avoid sticked area change its size when I scroll down


(Anton) #1

Is there an option in admin panel (and does it make sense to introduce one if there isn’t) that will allow me to force cutting the topic title (with using ellipsis?) for when it’s so long that it is going to change site header’s height when scrolling down the page and the topic’s title is being putted to the the header?


(Simon) #2

You could do something like that by adding the following CSS to your Site Customizations:

.extra-info a.topic-link, .extra-info a.badge-category {
    display: inline-block;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.extra-info a.topic-link { max-width: 90%; }
.extra-info a.badge-category { max-width: 10%; }

I haven’t tested it much, but it should basically work. One problem might be whitespace between the title and the category badge and padding/sizing issues because the box-sizing method is changed.


(Jeff Atwood) #3

Good news! We adopted the single line (with ellipsis) as standard for the docked header. :couple_with_heart:


(Jeff Atwood) #4