Utilizing Bootstrap BS3
for the construction of my Django website
. I created a dropdown-submenu
that is operational on http://www.bootply.com/nZaxpxfiXz#
https://i.sstatic.net/85uTq.png
However, when implementing the same in my project, I encountered:
https://i.sstatic.net/hctZy.png
The issue is that the dropdown-menu title lacks the small arrow, which prevents navigation and displaying submenus such as:
- Accueil Fiches Individuelles
- Création Fiches Individuelles
- ...
This is the script used:
<!DOCTYPE html>
<html>
<head>
{% load staticfiles %}
{% load user_tags %}
<title> DatasystemsEC - Accueil </title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="base.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="{% static 'css/Base.css' %}"/>
</head>
<!-- #################### -->
<!-- Upper navigation bar -->
<!-- #################### -->
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="http://www.datasystems.fr/"> DatasystemsEC </a>
</div>
<!-- Home tab -->
<ul class="nav navbar-nav">
<li><a href="{% url "accueil" %}"> <span class="glyphicon glyphicon-home"></span> Accueil </a></li>
<!-- Resume Tab with acts -->
{% if user.is_authenticated %}
<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Actes Etat Civil <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="dropdown dropdown-submenu"><a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span class="glyphicon glyphicon-baby-formula"></span> Fiches Individuelles </a>
<ul class="dropdown-menu">
<li><a href="#">Accueil Fiches Individuelles</a></li>
<li><a href="#">Création Fiches Individuelles</a></li>
<li><a href="#">Consultation Fiches Individuelles</a></li>
<li><a href="#">Edition Fiches Individuelles</a></li>
<li><a href="#">Suppression Fiches Individuelles</a></li>
</ul>
</li>
<li class="dropdown dropdown-submenu"><a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span class="glyphicon glyphicon-baby-formula"></span> Actes de Naissance</a>
<ul class="dropdown-menu">
<li><a href="#">Accueil Actes de Naissance</a></li>
<li><a href="#">Création Actes de Naissance</a></li>
<li><a href="#">Consultation Actes de Naissance</a></li>
</ul>
</li>
</ul>
</li>
{% endif %}
</ul>
</div>
</nav>
{% block content %}
{% csrf_token %}
{% endblock content %}
</html>
A CSS file is also included:
/* ###################################################### */
/* CSS File about BirthCertificate application properties */
/* ###################################################### */
/* Define background color from upper navbar */
.navbar-inverse {
background-color: #0083A2;
}
/* DatasystemsEC tab */
.navbar-inverse .container-fluid .navbar-header .navbar-brand {
color : white;
}
/* Tab properties from navbar */
.navbar .nav > li > a {
color: white;
}
.navbar .nav > li > a:hover {
color: #454545;
}
.active {
background-color: #454545;
}
/* Titles properties */
h1, h2, h4 {
color: #0083A2;
}
/* Define button properties */
.button {
display: inline;
margin-left: auto;
margin-right: auto;
border-radius: 8px;
font-size: 16px;
background-color: #e7e7e7;
-webkit-transition-duration: 0.2s;
transition-duration: 0.2s;
}
/* Define form fields properties */
.form-fields {
border-radius: 8px;
margin-right: auto;
}
.col-sm-6 {
display:inline-block;
margin-left : 10px;
width: 30%;
list-style: none;
}
.col-sm-8 {
list-style: initial;
}
.col-sm-10 {
display:inline-block;
margin-left : 10px;
width: 800%;
list-style: none;
}
/* Hoover button properties */
.button:hover {
background-color: #0083A2;
color: #454545;
}
/* Hover color dropdown menu */
.dropdown-menu>li>a:hover {
color: #FFFFFF;
text-decoration: none;
background-color: #0083A2;
}
.logo {
position : fixed ;
top:0;
left:100px;
}
@justify {
text-align: justify;
}
.marginBottom-0 {margin-bottom:0;}
.dropdown-submenu{position:relative;}
.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px;}
.dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#cccccc;margin-top:5px;margin-right:-10px;}
.dropdown-submenu:hover>a:after{border-left-color:#555;}
.dropdown-submenu.pull-left{float:none;}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px;}
In need of assistance? Unable to find a solution for my predicament.