Adminlte: Nav Sidebar Text got truncated

Created on 26 Nov 2019  路  2Comments  路  Source: ColorlibHQ/AdminLTE

Describe the bug
I am using AdminLTE v3.x for a project. I observed that the some text on the left sidebar got truncated when its too long, and I see a scrollbar which I can't even click upon.

truncte_sidebar

Expected behavior
When the length of the text is much, I want it to wrap the text or make the remaining text to come under the other text. I don't want the scrollbar.

<li class="nav-item"> <a href="" class="nav-link"> <i class="nav-icon fas fa-chalkboard-teacher"></i> <p> Shortlisted & Selected Candidates </p> </a> </li>

How do I achieve this?

Environment (please complete the following information):

  • AdminLTE Version: [v3.0.0]
  • Operating System: [Windows]
  • Browser (Version): [Chrome (Latest)]
css bug 3.x

Most helpful comment

There are three options, you can use a real truncate with ellipsis like this:

<li class="nav-item">
  <a href="pages/calendar.html" class="nav-link">
    <i class="nav-icon far fa-calendar-alt"></i>
    <p class="d-inline-flex">
      <span class="text-truncate d-inline-block" style="max-width: 150px">
        Calendar Calendar Calendar Calendar
      </span>
    </p>
    <span class="badge badge-info right">2</span>
  </a>
</li>
<li class="nav-item">
  <a href="pages/gallery.html" class="nav-link">
    <i class="nav-icon far fa-image"></i>
    <p class="d-inline-flex">
      <span class="text-truncate d-block" style="max-width: 170px">
        Gallery Gallery Gallery Gallery
      </span>
    </p>
  </a>
</li>

or change the sidebar text size with .text-sm on .nav-sidebar
or change the sidebar menu item text size with .text-sm on p.

All 2 comments

There are three options, you can use a real truncate with ellipsis like this:

<li class="nav-item">
  <a href="pages/calendar.html" class="nav-link">
    <i class="nav-icon far fa-calendar-alt"></i>
    <p class="d-inline-flex">
      <span class="text-truncate d-inline-block" style="max-width: 150px">
        Calendar Calendar Calendar Calendar
      </span>
    </p>
    <span class="badge badge-info right">2</span>
  </a>
</li>
<li class="nav-item">
  <a href="pages/gallery.html" class="nav-link">
    <i class="nav-icon far fa-image"></i>
    <p class="d-inline-flex">
      <span class="text-truncate d-block" style="max-width: 170px">
        Gallery Gallery Gallery Gallery
      </span>
    </p>
  </a>
</li>

or change the sidebar text size with .text-sm on .nav-sidebar
or change the sidebar menu item text size with .text-sm on p.

Issue resolved. Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

acacha picture acacha  路  4Comments

jrandhawa09 picture jrandhawa09  路  3Comments

fromberg100 picture fromberg100  路  4Comments

tester10 picture tester10  路  3Comments

GuxMartin picture GuxMartin  路  3Comments