Search code examples
cssruby-on-railsadminlte

AdminLTE toggled sidebar space between menus


I'm having this weird problem with my AdminLTE mini sidebar (when I press "Toggle" button).

In normal mode works OK but when I collapse the sidebar this space between title and tree appears and that messes the functionality because when I move the pointer over that space menu hides and I have to move through to get to the options.

Blank space between "General" and "Usuarios":

Blank space between "General" and "Usuarios"

I tried replacing my HTML code with the original AdminLTE code but the problem persists. The only way I found to "solve" this is removing the "include tree ." option from my Rails asset pipeline , but I cant find the problem exploring one by one the css files.

Code :

<aside class="main-sidebar">
  <!-- sidebar: style can be found in sidebar.less -->
  <section style="height: auto;" class="sidebar">
    <!-- Sidebar user panel -->
    <div class="user-panel">
      <div class="pull-left image">
        <img src="dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">
      </div>
      <div class="pull-left info">
        <p>Hola, Bárbara</p>
      </div>
    </div>
    <!-- sidebar menu: : style can be found in sidebar.less -->
    <ul class="sidebar-menu">
      <li class="header">MENU DE NAVEGACION</li>
      <li class="treeview active">
        <a href="#">
          <i class="fa fa-dashboard"></i> <span>General</span> <i class="fa fa-angle-left pull-right"></i>
        </a>
        <ul class="treeview-menu">
          <li role='presentation' class='<%= "active" if controller_name == "users" %>'>
            <a href='/admin/users'>
              <i class="fa fa-circle-o text-yellow"></i>Usuarios
            </a>
          </li>
          <li role='presentation' class='<%= "active" if controller_name == "schools" %>'>
            <a href='/schools'>
              <i class="fa fa-circle-o text-yellow"></i>Colegios
            </a>
          </li>
        </ul>
      </li>
      <li class="treeview active">
        <a href="#">
          <i class="fa fa-files-o"></i>
          <span>Evaluaciones</span><i class="fa fa-angle-left pull-right"></i>
        </a>
        <ul class="treeview-menu">
          <li role='presentation' class='<%= "active" if controller_name == "evaluations" %>'>
            <a href='/evaluations'>
              <i class="fa fa-circle-o text-red"></i>Listar Evaluaciones
            </a>
          </li>
          <li role='presentation' class='<%= "active" if controller_name == "evaluations" %>'>
            <a href='/evaluations/new'>
              <i class="fa fa-circle-o text-red"></i>Crear evaluación
            </a>
          </li>
          <li role='presentation' class='<%= "active" if controller_name == "questions" %>'>
            <a href='/questions'>
              <i class="fa fa-circle-o text-red"></i>Listar preguntas
            </a>
          </li>
          <li role='presentation' class='<%= "active" if controller_name == "questions" %>' >
            <a href='/questions/new'>
              <i class="fa fa-circle-o text-red"></i>Crear pregunta
            </a>
          </li>
        </ul>
      </li>
      <li class="treeview active">
        <a href="#">
          <i class="fa fa-dashboard"></i>
          <span>Indicadores</span>
          <i class="fa fa-angle-left pull-right"></i>
        </a>
        <ul class="treeview-menu">
          <li role='presentation' class='<%= "active" if controller_name == "contents" %>'>
            <a href='/contents'><i class="fa fa-circle-o text-aqua"></i>Contenidos/Aprendizajes
            </a>
          </li>
          <li role='presentation' class='<%= "active" if controller_name == "axes" %>'><a href='/axes'>
            <i class="fa fa-circle-o text-aqua"></i>Ejes
            </a>
          </li>
          <li role='presentation' class='<%= "active" if controller_name == "pme_abilities" %>'>
            <a href='/pme_abilities'>
              <i class="fa fa-circle-o text-aqua"></i>Habilidades/Ejes PME
            </a>
          </li>
          <li role='presentation' class='<%= "active" if controller_name == "bloom_abilities" %>'>
            <a href='/bloom_abilities'>
              <i class="fa fa-circle-o text-aqua"></i>Habilidades Cognitivas
            </a>
          </li>
          <li role='presentation' class='<%= "active" if controller_name == "units" %>'><a href='/units'>
            <i class="fa fa-circle-o text-aqua"></i>Unidades
            </a>
          </li>
          <li role='presentation' class='<%= "active" if controller_name == "learning_goals" %>'><a href='/learning_goals'>
            <i class="fa fa-circle-o text-aqua"></i>Objetivos de aprendizaje
            </a>
          </li>
          <li role='presentation' class='<%= "active" if controller_name == "difficulty_levels" %>'>
            <a href='/difficulty_levels'><i class="fa fa-circle-o text-aqua"></i>Niveles de dificultad
            </a>
          </li>
        </ul>
      </li>
      <li class="treeview active">
        <a href="#">
          <i class="fa fa-money"></i>
          <span>Facturación</span>
          <i class="fa fa-angle-left pull-right"></i>
        </a>
        <ul class="treeview-menu">
          <li><a href="#"><i class="fa fa-circle-o text-green"></i>General</a></li>
          <li><a href="#"><i class="fa fa-circle-o text-green"></i>Cobranza</a></li>
          <li><a href="#"><i class="fa fa-circle-o text-green"></i>Fidelización</a></li>
        </ul>
      </li>
      <li class="treeview active">
        <a href="#">
          <i class="fa fa-edit"></i> <span>Administración</span>
          <i class="fa fa-angle-left pull-right"></i>
        </a>
        <ul class="treeview-menu">
          <li><a href="pages/forms/general.html"><i class="fa fa-circle-o text-orange"></i> Ver informes</a></li>
          <li><a href="pages/forms/advanced.html"><i class="fa fa-circle-o text-orange"></i> Rangos de corte</a></li>
          <li><a href="pages/forms/editors.html"><i class="fa fa-circle-o text-orange"></i> Ingreso resultados</a></li>
          <li><a href="pages/forms/editors.html"><i class="fa fa-circle-o text-orange"></i> Descarga evaluaciones</a></li>
        </ul>
      </li>
    </ul>
  </section>
  <!-- /.sidebar -->
</aside>

Solution

  • I stumbled upon the same issue. Look at scaffolds.scss and under css p, ol, ul, td and comment out the font-size. That seemed to be causing the issue for me.