MyBB Community Forums

Full Version: Need Help with Forum Sidebar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I was wondering if anyone knew how I could shorten the amount of characters that show in the sidebar for the thread titles or do some kind of fix so it doesn't push it down?
As you can see, the bottom one is messed up because of the length of the text.
[Image: rJOBl54.png]

forum is https://weeb.sx

Any ideas, thanks?
If you are familiar with php you could use something like this
http://stackoverflow.com/questions/42585...-more-link and adapt it for your own purpose
(2016-03-17, 08:52 PM)mssushii Wrote: [ -> ]If you are familiar with php you could use something like this
http://stackoverflow.com/questions/42585...-more-link and adapt it for your own purpose

Notice the "...", it already does this it seems like.
[Image: rvvieu.png]
Then all you would need to do is to shorten the string length i believe? I can't certain since i don't know how it's done in your case.
You can do this with CSS.
[Image: Wybv1uq.png]

In you side bar HTML (im guessing it is in the index template), you will find something like this.

<div class="float_left">
      <span class="smalltext"><a href="somepost.html">Some long title that is wrapping your bar</a><br>
      By <a href="https://weeb.sx/user-000.html"><span style="#EEB7BA">username</span></a>,<br>1 hours ago</span>
</div>

You actually do not need the float_left as it will automatically float to the left. Replace float_left with truncate and add the below CSS to your global.css file.

<div class="truncate">
      <span class="smalltext"><a href="somepost.html">Some long title that is wrapping your bar</a><br>
      By <a href="https://weeb.sx/user-000.html"><span style="#EEB7BA">username</span></a>,<br>1 hours ago</span>
</div>

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