sidebar-toggle adminlte not work in yii2 - yii2

How can I fix my left side navigation. I am using AdminLTE 2.0in yii2 framework.
The problem is, the toggle side-bar not work after i do composer update yesterday (9.00 am Malaysia time).
I suspect the error must happen from javascript.
But could not find any.
Therefore, i give you my code to discuss here.
Thank You
backend\views\layout\header.php
<?php
use backend\assets\AppAsset;
use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
/* #var $this \yii\web\View */
/* #var $content string */
AppAsset::register($this);
?>
<header class="main-header">
<a href="../../index2.html" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><b>A</b>U</span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"><b>A</b>uTem</span>
</a>
<!--
<?= Html::a(Yii::$app->name, Yii::$app->homeUrl, ['class' => 'logo']) ?> -->
<nav class="navbar navbar-static-top" role="navigation">
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<!-- Navbar Right Menu -->
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
<!-- Messages: style can be found in dropdown.less-->
<li class="dropdown messages-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-envelope-o"></i>
<span class="label label-success">4</span>
</a>
<ul class="dropdown-menu">
<li class="header">You have 4 messages</li>
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li><!-- start message -->
<a href="#">
<div class="pull-left">
<img src="<?= $directoryAsset ?>/img/avatar2.png" class="img-circle" alt="user image"/>
</div>
<h4>
AdminLTE Design Team
<small><i class="fa fa-clock-o"></i> 2 hours</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
<li>
<a href="#">
<div class="pull-left">
<img src="<?= $directoryAsset ?>/img/avatar.png" class="img-circle" alt="user image"/>
</div>
<h4>
Developers
<small><i class="fa fa-clock-o"></i> Today</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
<li>
<a href="#">
<div class="pull-left">
<img src="<?= $directoryAsset ?>/img/avatar2.png" class="img-circle" alt="user image"/>
</div>
<h4>
Sales Department
<small><i class="fa fa-clock-o"></i> Yesterday</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
<li>
<a href="#">
<div class="pull-left">
<img src="<?= $directoryAsset ?>/img/avatar.png" class="img-circle" alt="user image"/>
</div>
<h4>
Reviewers
<small><i class="fa fa-clock-o"></i> 2 days</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
</ul>
</li>
<li class="footer">See All Messages</li>
</ul>
</li>
<!-- Notifications: style can be found in dropdown.less -->
<li class="dropdown notifications-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-warning"></i>
<span class="label label-warning">10</span>
</a>
<ul class="dropdown-menu">
<li class="header">You have 10 notifications</li>
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li>
<a href="#">
<i class="ion ion-ios7-people info"></i> 5 new members joined today
</a>
</li>
<li>
<a href="#">
<i class="fa fa-warning danger"></i> Very long description here that may not fit into the page
and may cause design problems
</a>
</li>
<li>
<a href="#">
<i class="fa fa-users warning"></i> 5 new members joined
</a>
</li>
<li>
<a href="#">
<i class="ion ion-ios7-cart success"></i> 25 sales made
</a>
</li>
<li>
<a href="#">
<i class="ion ion-ios7-person danger"></i> You changed your username
</a>
</li>
</ul>
</li>
<li class="footer">View all</li>
</ul>
</li>
<!-- Tasks: style can be found in dropdown.less -->
<li class="dropdown tasks-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-tasks"></i>
<span class="label label-danger">9</span>
</a>
<ul class="dropdown-menu">
<li class="header">You have 9 tasks</li>
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li><!-- Task item -->
<a href="#">
<h3>
Design some buttons
<small class="pull-right">20%</small>
</h3>
<div class="progress xs">
<div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar"
aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
<span class="sr-only">20% Complete</span>
</div>
</div>
</a>
</li>
<!-- end task item -->
<li><!-- Task item -->
<a href="#">
<h3>
Create a nice theme
<small class="pull-right">40%</small>
</h3>
<div class="progress xs">
<div class="progress-bar progress-bar-green" style="width: 40%" role="progressbar"
aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
<span class="sr-only">40% Complete</span>
</div>
</div>
</a>
</li>
<!-- end task item -->
<li><!-- Task item -->
<a href="#">
<h3>
Some task I need to do
<small class="pull-right">60%</small>
</h3>
<div class="progress xs">
<div class="progress-bar progress-bar-red" style="width: 60%" role="progressbar"
aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
<span class="sr-only">60% Complete</span>
</div>
</div>
</a>
</li>
<!-- end task item -->
<li><!-- Task item -->
<a href="#">
<h3>
Make beautiful transitions
<small class="pull-right">80%</small>
</h3>
<div class="progress xs">
<div class="progress-bar progress-bar-yellow" style="width: 80%" role="progressbar"
aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
<span class="sr-only">80% Complete</span>
</div>
</div>
</a>
</li>
<!-- end task item -->
</ul>
</li>
<li class="footer">
View all tasks
</li>
</ul>
</li>
<?php
if (Yii::$app->user->isGuest) {
?>
<li class="footer">
<?= Html::a('Login', ['/site/login']) ?>
</li>
<?php
} else {
?>
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="glyphicon glyphicon-user"></i>
<span><?= #Yii::$app->user->identity->username ?> <i class="caret"></i></span>
</a>
<ul class="dropdown-menu">
<!-- User image -->
<li class="user-header light-blue">
<img src="<?= $directoryAsset ?>/img/avatar5.png" class="img-circle" alt="User Image"/>
<p>
<?= #Yii::$app->user->identity->username ?> - Web Developer
<small>Member since Nov. 2012</small>
</p>
</li>
<!-- Menu Body -->
<li class="user-body">
<div class="col-xs-4 text-center">
Followers
</div>
<div class="col-xs-4 text-center">
Sales
</div>
<div class="col-xs-4 text-center">
Friends
</div>
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
Profile
</div>
<div class="pull-right">
<?= Html::a(
'Sign out',
['/site/logout'],
['data-method' => 'post','class'=>'btn btn-default btn-flat']
) ?>
</div>
</li>
</ul>
</li><?php
}
?>
<!-- User Account: style can be found in dropdown.less -->
</ul>
</div>
</nav>
</header>
backend\assets\AppAsset.php
<?php
/**
* #link http://www.yiiframework.com/
* #copyright Copyright (c) 2008 Yii Software LLC
* #license http://www.yiiframework.com/license/
*/
namespace backend\assets;
use yii\web\AssetBundle;
/**
* #author Qiang Xue <qiang.xue#gmail.com>
* #since 2.0
*/
class AppAsset extends AssetBundle
{
public $basePath = '#webroot';
public $baseUrl = '#web';
public $css = [
'css/site.css',
];
public $js = [
'js/highcharts.js',
'js/exporting.js',
'js/graphDashboard.js',
'js/jquery.dataTables.bootstrap.js',
'js/jquery.dataTables.min.js',
'js/manageAlumni.js',
'js/viewReport.js',
'js/managefaculty.js',
'js/managecourse.js',
'js/statisticAlumni.js',
'js/advSearch.js',
'js/app.min.js',
];
public $depends = [
'yii\web\YiiAsset',
'yii\bootstrap\BootstrapAsset',
//'fedemotta\datatables\DataTablesAsset',
];
}

Try to replace
data-toggle="offcanvas"
with
data-toggle="push-menu"

try to change composer.json
"dmstr/yii2-adminlte-asset": "2.*"
to
"dmstr/yii2-adminlte-asset": "2.4.4"
and then run "composer update"
this will solve menu toggle and menu tree view problems.

If you are on Admin-LTE 2.4.x,
Add data-widget="tree" to the sidebar menu. Specifically, it should look like this:
<ul class="sidebar-menu" data-widget="tree">
and
If your Sidebar Toggle is not working, do:
Change
data-toggle="offcanvas" to data-toggle="push-menu"

$(document).on('click', '[data-toggle="push-menu"]', function () {
if (!$('body').hasClass("sidebar-collapse") && $('body').hasClass("sidebar-open")) {
$('body').removeClass("sidebar-open");
$('body').addClass("sidebar-collapse");
$('body').addClass("sidebar-mini");
//console.log('menu kapa');
} else if($('body').hasClass("sidebar-collapse")) {
$('body').removeClass("sidebar-collapse");
$('body').addClass("sidebar-open");
//console.log('menu ac');
} else {
$('body').addClass("sidebar-collapse");
$('body').addClass("sidebar-open");
}
});

jQuery
$('[data-widget="pushmenu"]').on('click', function (){
$('[data-widget="pushmenu"]').PushMenu("toggle");
});

Related

Laravel helper method for active the sidebar

I am trying to use the laravel helper method for active the sidebar but it does not working. Can anyone tell us how to apply Laravel helper method to this sidebar.
Here this is my sidebar.blade.php file
<aside class="main-sidebar sidebar-dark-primary">
<!-- Main Sidebar Container -->
<!-- Brand Logo -->
<a href="{{url('dashboard')}}" class="brand-link">
<img src="{{asset('assets/adminlte-boot-4/dist/img/AdminLTELogo.png')}}" alt="Digital CRM" class="brand-image img-circle elevation-3"
style="opacity: .8">
<span class="brand-text font-weight-light">DIgital CRM</span>
</a>
<!-- Sidebar -->
<div class="sidebar-menu">
<!-- Sidebar user panel (optional) -->
<!-- Sidebar Menu -->
<nav class="mt-2">
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
<!-- Add icons to the links using the .nav-icon class
with font-awesome or any other icon font library -->
<li class="nav-item">
<a href="{{url('dashboard')}}" class="nav-link">
<i class="nav-icon fas fa-tachometer-alt"></i>
<p>Dashboard</p>
</a>
</li>
<li class="nav-item">
<a href="{{url('webtolead')}}" class="nav-link">
<i class="nav-icon fas fa-file"></i>
<p>Web to Lead</p>
</a>
</li>
</ul>
</nav>
<!-- /.sidebar-menu -->
</div>
<!-- /.sidebar -->
</aside>
Solution for this: add these method in your tag:
<li class="nav-item">
<a href="{{url('accounts')}}" class="nav-link {{ request()->is('accounts*') ? 'active' : '' }}">
<i class="nav-icon fas fa-user"></i>
<p>Accounts</p>
</a>
</li>
OR
<li class="nav-item ">
<a href="{{url('admin/updateprofile')}}" class="nav-link {{ Request::is('*admin/updateprofile*')? 'active' : '' }}">
<i class="fas fa-user nav-icon"></i>
<p>ProfileEdit</p>
</a>
</li>
both method are working...
Creating helper.php is good but this method is short in my case.
<aside class="main-sidebar sidebar-dark-primary">
<!-- Main Sidebar Container -->
<!-- Brand Logo -->
<a href="{{url('dashboard')}}" class="brand-link">
<img src="{{asset('assets/adminlte-boot-4/dist/img/AdminLTELogo.png')}}" alt="Digital CRM" class="brand-image img-circle elevation-3"
style="opacity: .8">
<span class="brand-text font-weight-light">DIgital CRM</span>
</a>
<!-- Sidebar -->
<div class="sidebar-menu">
<!-- Sidebar user panel (optional) -->
<!-- Sidebar Menu -->
<nav class="mt-2">
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
<!-- Add icons to the links using the .nav-icon class
with font-awesome or any other icon font library -->
<li class="nav-item">
<a href="{{url('dashboard')}}" class="nav-link {{ request()->is('dashboard') ? 'active' : '' }}">
<i class="nav-icon fas fa-tachometer-alt"></i>
<p>Dashboard</p>
</a>
</li>
<li class="nav-item">
<a href="{{url('webtolead')}}" class="nav-link {{ request()->is('webtolead*') ? 'active' : '' }}">
<i class="nav-icon fas fa-file"></i>
<p>Web to Lead</p>
</a>
</li>
</ul>
</nav>
<!-- /.sidebar-menu -->
</div>
<!-- /.sidebar -->
</aside>

Materialize side nav bar opening on one page - not working on page two

I have searched every thread in the forums, and not be able to resolve my issue. I mostly believe this is because I am new to coding and perhaps don't understand it properly yet.
please help page two below is the one with this issue. The side nav does not work it does not open on the page with the code below. and also it does not close when you click back on the page.
<body>
<!-- Header -->
<header class="main-header-inner">
<div class="navbar-fixed">
<nav class="transparent">
<div class="container">
<div class="nav-wrapper">
<img src="img/logo2.png">
<a href="#" data-activates="mobile-nav" class="button-collapse">
<i class="fa fa-bars"></i></a>
<ul class="right hide-on-med-and-down">
<li>
<a class="grey-text text-lighten-3" href="index.html">Home</a>
</li>
<li>
<a class="grey-text text-lighten-3" href="solutions.html">Solutions</a>
</li>
<li>
<a class="grey-text text-lighten-3 " href="index.html">About us</a>
</li>
<li>
<a href="https://be.linkedin.com/">
<i class="fab fa-linkedin fa-1x grey-text text-lighten-3"></i></a>
</li>
</ul>
</div>
</div>
</nav>
</div>
<div>
<ul class="side-nav" id="mobile-nav">
<h4 class="black-text text-darken-4 center">Lueur Tech</h4>
<li>
<div class="divider"></div>
</li>
<li>
<a href="index.html">
<i class="fa fa-home black-text text-darken-4"></i> Home</a>
</li>
<li>
<div class="divider"></div>
</li>
<li>
<a href="solutions.html">
<i class="fas fa-lightbulb fa-1x black-text text-lighten-3"></i> Solutions</a>
</li>
<li>
<div class="divider"></div>
</li>
<li>
<a href="index.html">
<i class="fa fa-info-circle fa-1x black-text text-lighten-3"></i> About us</a>
</li>
</ul>
</div>
index page where there is no issue but I have crossed checked both codes and can't find anything different. The only issue I have is that it remains open unless you click a link and I would like it to close if you click back on the page.
<body>
<!-- Header -->
<header class="main-header">
<div class="navbar-fixed">
<nav class="transparent">
<div class="container">
<div class="nav-wrapper">
<img src="img/logo2.png">
<a href="#" data-activates="mobile-nav" class="button-collapse">
<i class="fa fa-bars"></i>
</a>
<ul class="right hide-on-med-and-down">
<li>
<a class="grey-text text-lighten-3" href="index.html">Home</a>
</li>
<li>
<a class="grey-text text-lighten-3" href="solutions.html">Solutions</a>
</li>
<li>
<a class="grey-text text-lighten-3 " href="#About">About us</a>
</li>
<li>
<a href="https://be.linkedin.com/">
<i class="fab fa-linkedin fa-1x grey-text text-lighten-3"></i></a>
</li>
</ul>
</div>
</div>
</nav>
</div>
<div>
<ul class="side-nav" id="mobile-nav">
<h4 class="black-text text-darken-4 center">Lueur Tech</h4>
<li>
<div class="divider"></div>
</li>
<li>
<a href="index.html">
<i class="fa fa-home black-text text-darken-4"></i> Home</a>
</li>
<li>
<div class="divider"></div>
</li>
<li>
<a href="solutions.html">
<i class="fas fa-lightbulb fa-1x black-text text-lighten-3"></i> Solutions</a>
</li>
<li>
<div class="divider"></div>
</li>
<li>
<a href="#About">
<i class="fa fa-info-circle fa-1x black-text text-lighten-3"></i> About us</a>
</li>
</ul>
</div>
thank you for your help.
UPDATE: sideNav works in codepen.io/Bjorn_Ironside1986/pen/VRbyvL but doesn't work in codepen.io/Bjorn_Ironside1986/pen/OqmOdR
these 2 are required to see codepen working
<!--Import jQuery before materialize.js-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
I think it's because you never close your header tag.
You need some javascript to initialize the sidenav - in the code below, i just added the options for the side nave to open from the left... Click on the Menu button on the left.
Hope it works for you.
document.addEventListener('DOMContentLoaded', function() {
var elems = document.querySelectorAll('.sidenav');
var instances = M.Sidenav.init(elems, {
edge: 'left'
});
});
<!--Import jQuery before materialize.js-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<!-- Header -->
<header class="main-header-inner">
<div class="navbar-fixed">
<nav class="transparent">
<div class="container">
<div class="nav-wrapper">
<img src="img/logo2.png">
<a href="#" data-activates="mobile-nav" class="button-collapse">
<i class="fa fa-bars"></i></a>
<ul class="right hide-on-med-and-down">
<li>
<a class="grey-text text-lighten-3" href="index.html">Home</a>
</li>
<li>
<a class="grey-text text-lighten-3" href="solutions.html">Solutions</a>
</li>
<li>
<a class="grey-text text-lighten-3 " href="index.html">About us</a>
</li>
<li>
<a href="https://be.linkedin.com/">
<i class="fab fa-linkedin fa-1x grey-text text-lighten-3"></i></a>
</li>
</ul>
</div>
</div>
</nav>
</div>
<div>
<ul id="slide-out" class="sidenav">
<li>
<div class="user-view">
<div class="background">
<img src="images/office.jpg">
</div>
<img class="circle" src="images/yuna.jpg">
<span class="white-text name">John Doe</span>
<span class="white-text email">jdandturk#gmail.com</span>
</div>
</li>
<li>
<div class="divider"></div>
</li>
<li>
<a href="index.html">
<i class="fa fa-home black-text text-darken-4"></i> Home</a>
</li>
<li>
<div class="divider"></div>
</li>
<li>
<a href="solutions.html">
<i class="fas fa-lightbulb fa-1x black-text text-lighten-3"></i> Solutions</a>
</li>
<li>
<div class="divider"></div>
</li>
<li>
<a href="index.html">
<i class="fa fa-info-circle fa-1x black-text text-lighten-3"></i> About us</a>
</li>
</ul>
<a href="#" data-target="slide-out" class="sidenav-trigger">
<h4 class="black-text text-darken-4 center">Lueur Tech</h4>
</a>
</div>
<!-- Showcase -->
<div class="showcase container">
<div class="row">
<div class="col s12 m10 offset-m1 center">
<h1>The Digital World</h1>
<h5>Solutions</h5>
</div>
</div>
</div>
</header>
<!-- Section: Solutions About -->
<section class="section section-solutions-about">
<div class="container">
<div class="row">
<div class="col s12 m5">
<h2>What We Do...</h2>
<p>Solutions are ways of solving problems, when you consider world issues today, everything boils down to Langauge, Maths, Technology and Science! If you consider what these represent, in one view that could be taken if we break them down it is merely
code in some form, structed together to create innovation.</p>
</div>
<div class="col s12 m6 offset-m1">
<div class="row">
<div class="col s12">
<ul class="tabs">
<li class="tab col s4">
Web Devlopment
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Section: Features -->
<section class="section section-features grey lighten-3">
<div class="container center">
<h4>
<span class="deep-purple-text text-darken-1 center">Powerful</span> & Innovative</h4>
<h6 class="grey-text text-darken-2 center">We aim to assist you, and provide quality of service to help you scale your business, capture new clients and retain existing customers with our desings!</h6>
<br>
<br>
<!-- Row 1 -->
<div class="row">
<div class="col s12 m4">
<h5>
<i class="fa fa-user"></i> User Friendly Applications
</h5>
<p>As a business the focus is on the client and the user to generate interest or purchase of services and products. We focus on functionality and accessability at the forefront of every desgin to ensure the user maintains interest. We ask you to
provide the information needed to explain your product or service which will allow the user to make an informed choice.</p>
</div>
<div class="col s12 m4">
<h5>
<i class="fa fa-database"></i> Security of user and client Data
</h5>
<p>In today's society information is the new form of gold. We can advise you on policys such as EU GDPR and UK data protection laws. Depedning on your wesbites structure we will inform you of any products which may be of benfit to prevent cyber crime.
</p>
</div>
<div class="col s12 m4">
<h5>
<i class="fa fa-chart-line"></i> Data Analytics
</h5>
<p>
Data helps devlope a business it can show growing trends or point out possible issues. With this information a business can takes steps to proctect both themsleves and their client but also it can assist them in devloping growth and expanding into new
sectors. We can advise on tools which can be helpful to your business in relation gathering data from users.</p>
</div>
</div>
<!-- Row 2 -->
<div class="row">
<div class="col s12 m4">
<h5>
<i class="fa fa-github"></i> Problem Solving
</h5>
<p>
Programing is not for everyone, that is why their are expereinced devlopers who offer services such a repair or managing sites. We can offer sulutions to problems with your site should the need arise. In some circumstances we may offer to manage your
site for a fee, this can be discussed further dpending your needs.
</p>
</div>
<div class="col s12 m4">
<h5>
<i class="fa fa-plus"></i> Add-ons
</h5>
<p>Our main service is devlopment, we dont offer hosting services or provide domain names. We can put you in touch with some providers, depending on your business services. We dont offer graphic design. We source images which are free of royalty
and are licenced for commecial use to prevent any legal or copyright issues. But sometimes we have to use images from sources such as adobe stock therefore these are not free and will be added to the final invoice. </p>
</div>
<div class="col s12 m4">
<h5>
<i class="fas fa-desktop"></i> Website Design
</h5>
<p> We can offer a range of services in relation to desgin and devlopment. We can do "Landing Page" Mulitiple Page Design, One page design with different sections and E-commerce sites with a database. We can also build custome designs, all our projects
take time depending on complexity and nature of the project.</p>
</div>
</div>
<div class="center">
<h5>
<span class="deep-purple-text text-lighten-1">Have a question? </span> Contact our sales team
</h5>
<p>sales#lueurtech.co.uk</p>
</div>
</div>
</section>
<!-- Footer -->
<footer class="page-footer black lighten-1">
<div class="container">
<div class="row">
<div class="col l6 s12">
<h5 class="white-text">About Us</h5>
<p class="grey-text text-lighten-4">Our company name "Lueur" is a french word which translates to "Glow" the more common use of the word is "lueur d'espoir" which means "Glimmer of Hope" it is in this meaning that our business looks to offer small business the chance to glow. We
take into consideration that everyone just wants to succeed in life and in business so our mission of course is to make a stable business but the main prespective is to give hope and help people grow!</p>
</div>
<div class="col l4 offset-l2 s12">
<h5 class="white-text">Links</h5>
<ul>
<li>
<a class="grey-text text-lighten-3 " href="index.html">Home</a>
</li>
<li>
<a class="grey-text text-lighten-3" href="solutions.html">Solutions</a>
</li>
<li>
<a class="grey-text text-lighten-3" href="index.html">About us</a>
</li>
</ul>
</div>
</div>
</div>
<div class="footer-copyright deep-purple darken-1">
<div class="container">
<div> Lueur Tech © 2018</div><i class="fab fa-cc-paypal fa-3x grey-text text-lighten-3"></i>
<a href="https://be.linkedin.com/">
<i class="fab fa-linkedin fa-3x grey-text text-lighten-3"></i></a>
<p class="grey-text text-lighten-4 right " href="#!"> Terms | Legal | Privacy</p>
</div>
</footer>

How to get rid of this excess scroll down bar

I'm just developing a Reproting Tool and due to some reason i have two scroll bars,one which is for Chrome or any other browser and the other is part of the HTML,i couldn't trace anything back to the HTML..
> </head>
<body style="min-height:20px">
<!-- START PAGE CONTAINER -->
<div class="page-container" style="min-height:20px">
<!-- START PAGE SIDEBAR -->
<div class="page-sidebar">
<!-- START X-NAVIGATION -->
<ul class="x-navigation">
<li class="xn-logo">
Reports
</li>
<li class="xn-profile">
<!--<a href="#" class="profile-mini">
<img src="assets/images/users/avatar.jpg" alt="John Doe" />
</a>-->
<div class="profile">
<!--<div class="profile-image">
<img src="assets/images/users/avatar.jpg" alt="John Doe" />
</div>-->
<!--<div class="profile-data">
<div class="profile-data-name">John Doe</div>
<div class="profile-data-title">Web Developer/Designer</div>
</div>-->
<!--<div class="profile-controls">
<span class="fa fa-info"></span>
<span class="fa fa-envelope"></span>
</div>-->
</div>
</li>
<li class="xn-title">Navigation</li>
<li >
<span class="fa fa-cogs fa-spin" title="Configure Reports"></span> <span class="xn-text">Configure Reports</span>
</li>
<li>
<span class="fa fa-cogs fa-spin" title="Configure Dashboard"></span> <span class="xn-text">Configure Dashboard</span>
</li>
<li class="active">
<span class="fa fa-eye" title="View Dashboard"></span> <span class="xn-text">View Dashboard</span>
</li>
</ul>
<!-- END X-NAVIGATION -->
Any Help would be deeply appreciated
what you can do is
to the main div you can apply css like for example you have
<div class ="main">
// rest of your code
</div>
in your main style.css you can put
.main {
width:100%;
height:90%;
overflow:hidden;
}
if this doesn't work you can use
body {
overflow-y:hidden;
}

Unordered List Dropdown Submenu - Stay Activated When Clicked

I'm working on the navbar for a site and for the menu it has an unordered list with submenus that are actived when the menu item is hovered over, but when you remove your mouse from the menu item to attempt to click on a submenu item the submenu dissapears. Is there a way with CSS/HTML to hover over it, then have the user click on it to keep it activated? If that's not possible, is it possible to change it to stay activated on a click without the preview on the hover?
HTML:
<!-- Navbar -->
<div class="header">
<div class="topbar">
<ul class="list-inline">
<li class="smallsocial"> </li><li> </li>
<li class="smallsocial"> <a href="https://www.facebook.com/prayingpelicanmissions" class="tooltips" data-toggle="tooltip" data-placement="top" title="" data-original-title="Facebook">
<i class="fa fa-facebook"></i>
</a>
</li>
<li class="smallsocial">
<a href="https://plus.google.com/+PrayingpelicanmissionsOrg" class="tooltips" data-toggle="tooltip" data-placement="top" title="" data-original-title="Google Plus">
<i class="fa fa-google-plus"></i>
</a>
</li>
<li class="smallsocial">
<a href="https://www.youtube.com/user/petepelican?sub_confirmation=1" class="tooltips" data-toggle="tooltip" data-placement="top" title="" data-original-title="Youtube">
<i class="fa fa-youtube"></i>
</a>
</li>
<li class="smallsocial">
<a href="https://twitter.com/PrayingPelican" class="tooltips" data-toggle="tooltip" data-placement="top" title="" data-original-title="Twitter">
<i class="fa fa-twitter"></i>
</a>
</li>
<li class="smallsocial">
<a href="https://www.instagram.com/prayingpelicanmissions/" class="tooltips" data-toggle="tooltip" data-placement="top" title="" data-original-title="Instagram">
<i class="fa fa-instagram"></i>
</a></li><li> </li>
<li class="pull-right"><button class="btn btn-dark">CONTACT US</button></li>
<li class="pull-right"><button class="btn btn-dark">LOGIN</button></li>
</ul>
</div>
<!-- End Social Links -->
<div class="navbar mega-menu" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="menu-container">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- Navbar Brand -->
<div class="navbar-brand">
<a href="index.html">
<img class="default-logo" src="assets/img/whitelogo.png" alt="Logo">
<img class="shrink-logo" src="assets/img/blacklogo.png" alt="Logo">
</a>
</div>
<!-- ENd Navbar Brand -->
<!-- Header Inner Right -->
<!-- End Header Inner Right -->
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-responsive-collapse">
<div class="menu-container">
<ul class="nav navbar-nav">
<!-- Home -->
<li class="dropdown">
<a href="javascript:void(0);" class="pull-right dropdown-toggle" data-toggle="dropdown">
About Us
</a>
<ul class="dropdown-menu">
<li>Who We Are</li>
<li>Partners</li>
<li>Trip Media</li>
<li>Trip Journals</li>
<li role="separator" class="divider"></li>
<li> Donate</li>
</ul>
<!-- End Home -->
<!-- Shortcodes -->
<li class="dropdown mega-menu-fullwidth">
<a href="javascript:void(0);" class="pull-right dropdown-toggle" data-toggle="dropdown">
Locations
</a>
<ul class="dropdown-menu">
<li>
<div class="mega-menu-content disable-icons">
<div class="container">
<div class="row equal-height">
<div class="col-md-3 equal-height-in">
<ul class="list-unstyled equal-height-list">
<li><h3>United States</h3></li>
<!-- Typography -->
<li class="location"><i></i> Tucson, AZ</li>
<li class="location"><i></i>San Francisco, CA</li>
<li class="location"><i></i> Miami, FL</li>
<li class="location"><i></i> Chicago, IL</li>
<li class="location"><i></i> Boston, MA</li>
<li class="location"><i></i>Minneapolis, MN</li>
<li class="location"><i></i> Pittsburg, PA</li>
<li class="location"><i></i> Providence, RI</li>
<li class="location"><i></i> Memphis, TN</li>
<li class="location"><i></i>US Reservations</li>
<!-- End Typography -->
</ul>
</div>
<div class="col-md-3 equal-height-in">
<ul class="list-unstyled equal-height-list">
<li><h3>CENTRAL AMERICA</h3></li>
<!-- Buttons -->
<li class="location"><i></i>Belize</li>
<li class="location"><i></i>Costa Rica</li>
<li class="location"><i></i>Guatemala</li>
<li class="location"><i></i>Mexico</li>
<li class="location"><i></i>Nicaragua</li>
<!-- End Buttons -->
</ul>
</div>
<div class="col-md-3 equal-height-in">
<ul class="list-unstyled equal-height-list">
<li><h3>CARIBBEAN</h3></li>
<!-- Buttons -->
<li class="location"><i></i>Bahamas</li>
<li class="location"><i></i>Cuba</li>
<li class="location"><i></i>Dominican Republic</li>
<li class="location"><i></i>Haiti</li>
<li class="location"><i></i>Jamaica</li>
<li class="location"><i></i>Puerto Rico</li>
<!-- End Buttons -->
</ul>
</div>
<div class="col-md-3 equal-height-in">
<ul class="list-unstyled equal-height-list">
<li><h3>AFRICA/EUROPE</h3></li>
<!-- Buttons -->
<li class="location"><i></i>Italy</li>
<li class="location"><i></i>Ghana</li>
<li class="location"><i></i>South Africa</li>
<!-- End Buttons -->
</ul>
</div>
</div>
</div>
</div>
</li>
</ul>
</li>
<!-- End Shortcodes -->
<!-- Demo Pages -->
<li class="">
<a href="http://www.prayingpelicanmissions.org/journals">
Trip Journals
</a>
</li>
<li class=".button12">
<a href="http://www.prayingpelicanmissions.org/mission-trip-registration">
<button type="button" class="btn btn-default">REGISTER FOR A TRIP</button>
</a>
</li>
<div class="header-inner-right">
<li class="menu-icons">
<i class="menu-icons-style search search-close search-btn fa fa-search"></i>
<div class="search-open">
<input type="text" class="animated fadeIn form-control" placeholder="Start searching ...">
</div>
<!-- End Demo Pages -->
</ul>
<!--/navbar-collapse-->
</div>
</div>
</div>
</div>
</div> <!-- End Navbar -->
There might be a small gap between the menu and submenu. Take a look here.
Ideally some code would help, but sounds like a nested dropdown would be more accurate, also I assume you are using Bootstrap 3?
Check this example Multi level dropdown menu BS3

Inheriting bootstrap with css in base.html

I'm trying to inherit this bootstrap (https://github.com/almasaeed2010/AdminLTE) from my base.html. I use this form to do it:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title> Dracoin | Dashboard </title>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<!-- bootstrap 3.0.2 -->
<link href="media/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<!-- font Awesome -->
<link href="media/bootstrap/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<!-- Ionicons -->
<link href="media/bootstrap/css/ionicons.min.css" rel="stylesheet" type="text/css" />
<!-- Morris chart -->
<link href="media/bootstrap/css/morris/morris.css" rel="stylesheet" type="text/css" />
<!-- jvectormap -->
<link href="media/bootstrap/css/jvectormap/jquery-jvectormap-1.2.2.css" rel="stylesheet" type="text/css" />
<!-- Date Picker -->
<link href="media/bootstrap/css/datepicker/datepicker3.css" rel="stylesheet" type="text/css" />
<!-- Daterange picker -->
<link href="media/bootstrap/css/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<!-- bootstrap wysihtml5 - text editor -->
<link href="media/bootstrap/css/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css" rel="stylesheet" type="text/css" />
<!-- Theme style -->
<link href="media/bootstrap/css/AdminLTE.css" rel="stylesheet" type="text/css" />
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body class="skin-blue">
<!-- header logo: style can be found in header.less -->
<header class="header">
<a href="{% url 'vista_principal' %}" class="logo">
<!-- Add the class icon to your logo image or logo icon to add the margining -->
<img src="img/avatar3.png" class="img-circle"/>
</a>
<!-- Header Navbar: style can be found in header.less -->
{% if user.is_authenticated %}
<nav class="navbar navbar-static-top" role="navigation">
<!-- Sidebar toggle button-->
<a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<div class="navbar-right">
<ul class="nav navbar-nav">
<!-- Messages: style can be found in dropdown.less-->
<li class="dropdown messages-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-envelope"></i>
<span class="label label-success">5</span>
</a>
<ul class="dropdown-menu">
<li class="header">You have 5 messages</li>
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li><!-- start message -->
<a href="#">
<div class="pull-left">
<img src="img/avatar3.png" class="img-circle" alt="User Image"/>
</div>
<h4>
Support Team
<small><i class="fa fa-clock-o"></i> 5 mins</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li><!-- end message -->
<li>
<a href="#">
<div class="pull-left">
<img src="img/avatar2.png" class="img-circle" alt="user image"/>
</div>
<h4>
AdminLTE Design Team
<small><i class="fa fa-clock-o"></i> 2 hours</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
<li>
<a href="#">
<div class="pull-left">
<img src="img/avatar.png" class="img-circle" alt="user image"/>
</div>
<h4>
Developers
<small><i class="fa fa-clock-o"></i> Today</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
<li>
<a href="#">
<div class="pull-left">
<img src="img/avatar2.png" class="img-circle" alt="user image"/>
</div>
<h4>
Sales Department
<small><i class="fa fa-clock-o"></i> Yesterday</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
<li>
<a href="#">
<div class="pull-left">
<img src="img/avatar.png" class="img-circle" alt="user image"/>
</div>
<h4>
Reviewers
<small><i class="fa fa-clock-o"></i> 2 days</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
</ul>
</li>
<li class="footer">See All Messages</li>
</ul>
</li>
<!-- Notifications: style can be found in dropdown.less -->
<li class="dropdown notifications-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-warning"></i>
<span class="label label-warning">10</span>
</a>
<ul class="dropdown-menu">
<li class="header">You have 10 notifications</li>
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li>
<a href="#">
<i class="ion ion-ios7-people info"></i> 5 new members joined today
</a>
</li>
<li>
<a href="#">
<i class="fa fa-warning danger"></i> Very long description here that may not fit into the page and may cause design problems
</a>
</li>
<li>
<a href="#">
<i class="fa fa-users warning"></i> 5 new members joined
</a>
</li>
<li>
<a href="#">
<i class="ion ion-ios7-cart success"></i> 25 sales made
</a>
</li>
<li>
<a href="#">
<i class="ion ion-ios7-person danger"></i> You changed your username
</a>
</li>
</ul>
</li>
<li class="footer">View all</li>
</ul>
</li>
<!-- Tasks: style can be found in dropdown.less -->
<li class="dropdown tasks-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-tasks"></i>
<span class="label label-danger">9</span>
</a>
<ul class="dropdown-menu">
<li class="header">You have 9 tasks</li>
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li><!-- Task item -->
<a href="#">
<h3>
Design some buttons
<small class="pull-right">20%</small>
</h3>
<div class="progress xs">
<div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
<span class="sr-only">20% Complete</span>
</div>
</div>
</a>
</li><!-- end task item -->
<li><!-- Task item -->
<a href="#">
<h3>
Create a nice theme
<small class="pull-right">40%</small>
</h3>
<div class="progress xs">
<div class="progress-bar progress-bar-green" style="width: 40%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
<span class="sr-only">40% Complete</span>
</div>
</div>
</a>
</li><!-- end task item -->
<li><!-- Task item -->
<a href="#">
<h3>
Some task I need to do
<small class="pull-right">60%</small>
</h3>
<div class="progress xs">
<div class="progress-bar progress-bar-red" style="width: 60%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
<span class="sr-only">60% Complete</span>
</div>
</div>
</a>
</li><!-- end task item -->
<li><!-- Task item -->
<a href="#">
<h3>
Make beautiful transitions
<small class="pull-right">80%</small>
</h3>
<div class="progress xs">
<div class="progress-bar progress-bar-yellow" style="width: 80%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
<span class="sr-only">80% Complete</span>
</div>
</div>
</a>
</li><!-- end task item -->
</ul>
</li>
<li class="footer">
View all tasks
</li>
</ul>
</li>
<!-- User Account: style can be found in dropdown.less -->
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="glyphicon glyphicon-user"></i>
<span>{{user.username}} <i class="caret"></i></span>
</a>
<ul class="dropdown-menu">
<!-- User image -->
<li class="user-header bg-light-blue">
{% if user.userprofile.photo %}
<img src="/media/{{user.userprofile.photo}}" width="100px" height="100px"/>
{% endif %}
<p>
{{user.username}} - Standard User
<small>{{user.userprofile.email}}</small>
</p>
</li>
<!-- Menu Body -->
<li class="user-body">
<div class="col-xs-4 text-center">
XXXX
</div>
<div class="col-xs-4 text-center">
Sales
</div>
<div class="col-xs-4 text-center">
XXXX
</div>
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
Profile
</div>
<div class="pull-right">
Sign out
</div>
</li>
</ul>
</li>
</ul>
</div>
</nav>
{% endif %}
</header>
<div class="wrapper row-offcanvas row-offcanvas-left">
<!-- Left side column. contains the logo and sidebar -->
<aside class="left-side sidebar-offcanvas">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- Sidebar user panel -->
{% if user.is_authenticated %}
<div class="user-panel">
<div class="pull-left image">
<img src="/media/{{user.userprofile.photo}}" class="img-circle" alt="User Image" />
</div>
<div class="pull-left info">
<p>Hello, {{user.username}}</p>
<i class="fa fa-circle text-success"></i> Online
</div>
</div>
<!-- search form -->
<form action="#" method="get" class="sidebar-form">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search..."/>
<span class="input-group-btn">
<button type='submit' name='seach' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
</span>
</div>
</form>
{% endif %}
<!-- /.search form -->
<!-- sidebar menu: : style can be found in sidebar.less -->
<ul class="sidebar-menu">
<li class="active">
<a href="{% url 'vista_principal' %}">
<i class="fa fa-dashboard"></i> <span>Dashboard</span>
</a>
</li>
<li>
<a href="{% url 'vista_aterrizaje' %}">
<i class="fa fa-th"></i> <span>Landing</span> <small class="badge pull-right bg-green">news</small>
</a>
</li>
{% if user.is_authenticated %}
<li>
<a href="/shop/page/1/">
<i class="fa fa-shopping-cart"></i> <span>Shop</span>
<small class="badge pull-right bg-red">5</small>
</a>
</li>
{% endif %}
<li>
<a href="{% url 'vista_contacto' %}">
<i class="fa fa-comment"></i> <span>Support</span>
</a>
</li>
{% if user.is_authenticated %}
<li>
<a href="{% url 'vista_logout' %}">
<i class="fa fa-sign-in"></i> <span>Sign out</span>
</a>
</li>
{% else %}
<li>
<a href="{% url 'vista_login' %}">
<i class="fa fa-sign-in"></i> <span>Sign in</span>
</a>
</li>
{% endif %}
</ul>
</section>
<!-- /.sidebar -->
</aside>
<!-- Right side column. Contains the navbar and content of the page -->
<aside class="right-side">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Dashboard
<small>Control panel</small>
</h1>
<ol class="breadcrumb">
<li><i class="fa fa-dashboard"></i> Home</li>
<li class="active">Dashboard</li>
</ol>
</section>
<!-- Main content -->
{% block content %}
{% endblock %}
<!-- /.content -->
</aside><!-- /.right-side -->
</div><!-- ./wrapper -->
<!-- add new calendar event modal -->
<!-- jQuery 2.0.2 -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<!-- jQuery UI 1.10.3 -->
<script src="media/bootstrap/js/jquery-ui-1.10.3.min.js" type="text/javascript"></script>
<!-- Bootstrap -->
<script src="media/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<!-- Morris.js charts -->
<script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<script src="media/bootstrap/js/plugins/morris/morris.min.js" type="text/javascript"></script>
<!-- Sparkline -->
<script src="media/bootstrap/js/plugins/sparkline/jquery.sparkline.min.js" type="text/javascript"></script>
<!-- jvectormap -->
<script src="media/bootstrap/js/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js" type="text/javascript"></script>
<script src="media/bootstrap/js/plugins/jvectormap/jquery-jvectormap-world-mill-en.js" type="text/javascript"></script>
<!-- jQuery Knob Chart -->
<script src="media/bootstrap/js/plugins/jqueryKnob/jquery.knob.js" type="text/javascript"></script>
<!-- daterangepicker -->
<script src="media/bootstrap/js/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
<!-- datepicker -->
<script src="media/bootstrap/js/plugins/datepicker/bootstrap-datepicker.js" type="text/javascript"></script>
<!-- Bootstrap WYSIHTML5 -->
<script src="media/bootstrap/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js" type="text/javascript"></script>
<!-- iCheck -->
<script src="media/bootstrap/js/plugins/iCheck/icheck.min.js" type="text/javascript"></script>
<!-- AdminLTE App -->
<script src="media/bootstrap/js/AdminLTE/app.js" type="text/javascript"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<script src="media/bootstrap/js/AdminLTE/dashboard.js" type="text/javascript"></script>
<!-- AdminLTE for demo purposes -->
<script src="media/bootstrap/js/AdminLTE/demo.js" type="text/javascript"></script>
</body>
</html>
My problem is only index.html display all heritage from base but my other pages (shop.html, contacto.html, landing.html) appear only with inherited content from base.html, the pages appear without any style.
I'm trying to find the mistake but i can't conceive...
I was trying using other styles from this page (http://getbootstrap.com/getting-started/) and heritage run perfectly in all pages. why my other bootstrap doesn't work? I'd have liked that my bootstrap run in all pages.
apologizeme in advance my extensive question and if I overlook something.
Thanks!!
You should use absolute paths for all of your assets:
<link href="/media/bootstrap/css/bootstrap.min.css" ...
(note the leading slash).
Even better, you should use the static tags to generate the locations automatically, according to your STATIC_URL setting:
{% load static %}
...
<link href="{% static "bootstrap/css/bootstrap.min.css" %}" ...