Fixed Sub-forum list untidy with long node titles

Chris D

XenForo developer
Staff member
upload_2013-9-1_10-21-12.webp

This is by no means a major issue, but when sub-forum node titles break over multiple lines, the layout doesn't look great.

The issue is further exasperated on custom styles where the font-size is different. And especially if other improvements have been made to the sub-forum list:

upload_2013-9-1_10-24-13.webp

For AVForums I have fixed this by adding some text-overflow: ellipsis:

In node_forum_level_n template I have changed this:

Code:
<div {xen:if $forum.hasNew, 'class="unread"'}>

To:

Code:
<div class="textOverflow{xen:if $forum.hasNew, ' unread'}">

And added the associated CSS to node_list.css:

Code:
.textOverflow
{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

This now produces something, I feel, is much neater:

upload_2013-9-1_10-29-9.webp

upload_2013-9-1_10-28-10.webp

Some people may have an issue with hiding part of the node title, in which case this could be made into a style property option that can be toggled. However, I think you'll agree in the above specific example, it's pretty clear from the well named titles what each forum is about, even with the ellipsis.
 
Actually, as far as a bot or crawler would know, the full node title is still there.

The remaining text is only hidden using CSS.

Google should still see: "Home Cinema Buying, Setup and General Help"

Rather than what we see, which is: "Home Cinema Buying, Setup and General ... "
 
Top Bottom