How do I cover the Bootstrap modal backdrop on the whole screen? - html

Scenario
I tried to cover backdrop on the whole screen but when I open my modal backdrop, the start from the header stays out of my modal backdrop. How can I cover the backdrop on the whole screen?
Modal HTML
<div class="modal fade" id="modalDetailFormalite" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="contact">Détails</h5>
<button type="button" class="close" aria-label="Close" onclick="hideModalDetailFormalite()">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="row" id="detailsFlows">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-common" id="btnAddToCardDocFlows" disabled="disabled">
<i class='fa fa fa-cart-plus' id="iconBtnAddToCardDocFlows"></i> Ajouter au panier
</button>
<button type="button" class="btn btn-secondary" id="btnCloseModalDetailFormalite" onclick="hideModalDetailFormalite()">Fermer</button>
</div>
</div>
</div>
</div>
Navbat HTML
<nav class="navbar navbar-expand-lg fixed-top scrolling-navbar">
<div class="container">
<div class="theme-header clearfix">
<div class="navbar-header">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#main-navbar" aria-controls="main-navbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
<span class="lni-menu"></span>
<span class="lni-menu"></span>
<span class="lni-menu"></span>
</button>
<img src="assets/img/logo.png" alt="">
</div>
<div class="collapse navbar-collapse" id="main-navbar">
<ul class="navbar-nav mr-auto w-100 justify-content-end" id="nav">
<li class="nav-item">
<a class="nav-link" href="index.html">
Accueil
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="apropos.html">
A Propos
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.html">
Contact
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="inscription.html">S'inscrire</a>
</li>
<li class="button-group">
<i class="lni-user"></i> Se connecter
</li>
</ul>
</div>
</div>
</div>
<div class="mobile-menu" data-logo="assets/img/logo.png"></div>
Here is what the view looks like when I call my modal

It is problem of z-index in navigation bar
add below CSS in your project, replace navbar class with your main navigation bar class
.modal-open .navbar {
z-index: 1100;
}

I just found the solution, which consisted in removing the z-index:999999 in my main.css file and leaving just the one in bootstrap.css z-index: 1030

Related

How to insert tabs inside drop-down menu in Bootstrap 5?

I am using the bootstrap 5 drop-down menus with tabs inside. Here is the code in I found this link useful to stop click event propagation so that the drop-down menu does not close on click inside itAvoid dropdown menu close on click inside.
I want to put the tabs inside the menu. That I can make something like this later.
How can I put tabs on my menu?
I want to make something like this: https://codepen.io/elhaw/pen/JZjJpJ?editors=1010
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.1.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.1.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-U1DAWAznBHeqEIlVSCgzq+c9gqGAJn5c/t99JyeKa9xxaYpSvHU5awsuZVVFIhvj" crossorigin="anonymous"></script>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Features</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Pricing</a>
</li>
<li class="nav-item dropdown">
<form>
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropdown link
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<div class="container">
<ul id="tabs" class="nav nav-tabs" role="tablist">
<li class="nav-item">
<a id="tab-A" href="#pane-A" class="nav-link active" data-bs-toggle="tab" role="tab">–A–</a>
</li>
<li class="nav-item">
<a id="tab-B" href="#pane-B" class="nav-link" data-toggle="tab" role="tab">–B–</a>
</li>
<li class="nav-item">
<a id="tab-C" href="#pane-C" class="nav-link" data-toggle="tab" role="tab">–C–</a>
</li>
</ul>
<div id="content" class="tab-content" role="tablist">
<div id="pane-A" class="card tab-pane fade show active" role="tabpanel" aria-labelledby="tab-A">
<div class="card-header" role="tab" id="heading-A">
<h5 class="mb-0">
<a data-toggle="collapse" href="#collapse-A" data-parent="#content" aria-expanded="true" aria-controls="collapse-A">
Collapsible Group Item A
</a>
</h5>
</div>
<div id="collapse-A" class="collapse show" role="tabpanel" aria-labelledby="heading-A">
<div class="card-body">
[Tab content A]
</div>
</div>
</div>
<div id="pane-B" class="card tab-pane fade" role="tabpanel" aria-labelledby="tab-B">
<div class="card-header" role="tab" id="heading-B">
<h5 class="mb-0">
<a class="collapsed" data-toggle="collapse" href="#collapse-B" data-parent="#content" aria-expanded="false" aria-controls="collapse-B">
Collapsible Group Item B
</a>
</h5>
</div>
<div id="collapse-B" class="collapse" role="tabpanel" aria-labelledby="heading-B">
<div class="card-body">
[Tab content B]
</div>
</div>
</div>
<div id="pane-C" class="card tab-pane fade" role="tabpanel" aria-labelledby="tab-C">
<div class="card-header" role="tab" id="heading-C">
<h5 class="mb-0">
<a class="collapsed" data-toggle="collapse" href="#collapse-C" data-parent="#content" aria-expanded="false" aria-controls="collapse-C">
Collapsible Group Item C
</a>
</h5>
</div>
<div id="collapse-C" class="collapse" role="tabpanel" aria-labelledby="heading-C">
<div class="card-body">
[Tab content C]
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</li>
</ul>
</div>
</nav>
How about this?
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.1.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.1.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-U1DAWAznBHeqEIlVSCgzq+c9gqGAJn5c/t99JyeKa9xxaYpSvHU5awsuZVVFIhvj" crossorigin="anonymous"></script>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Features</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Pricing</a>
</li>
<li class="nav-item dropdown" style="position: initial;">
<form>
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-bs-auto-close="outside" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropdown link
</a>
<div class="dropdown-menu" style="width: 100%;" aria-labelledby="navbarDropdownMenuLink">
<div class="container">
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="pane-A" data-bs-toggle="tab" data-bs-target="#paneA" type="button" role="tab" aria-controls="paneA" aria-selected="true">-A-</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="pane-B" data-bs-toggle="tab" data-bs-target="#paneB" type="button" role="tab" aria-controls="paneB" aria-selected="false">-B-</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="pane-C" data-bs-toggle="tab" data-bs-target="#paneC" type="button" role="tab" aria-controls="paneC" aria-selected="false">-C-</button>
</li>
</ul>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="paneA" role="tabpanel" aria-labelledby="pane-A">
<a class="btn btn-primary" data-bs-toggle="collapse" href="#collapseA" role="button" aria-expanded="false" aria-controls="collapseA">
Collapsible Group Item A
</a>
<div class="collapse" id="collapseA">
<div class="card card-body">
---- Content A ----
</div>
</div>
</div>
<div class="tab-pane fade" id="paneB" role="tabpanel" aria-labelledby="pane-B">
<a class="btn btn-primary" data-bs-toggle="collapse" href="#collapseB" role="button" aria-expanded="false" aria-controls="collapseB">
Collapsible Group Item B
</a>
<div class="collapse" id="collapseB">
<div class="card card-body">
---- Content B ----
</div>
</div>
</div>
<div class="tab-pane fade" id="paneC" role="tabpanel" aria-labelledby="pane-C">
<a class="btn btn-primary" data-bs-toggle="collapse" href="#collapseC" role="button" aria-expanded="false" aria-controls="collapseC">
Collapsible Group Item C
</a>
<div class="collapse" id="collapseC">
<div class="card card-body">
---- Content C ----
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</li>
</ul>
</div>
</nav>
PS: I changed some of the attributes and id's. You can change them as you wish.

Bootstrap Navbar: How to make external search bar appear in expanded navbar correctly?

I have a Bootstrap 5 navbar with a search bar then a notifications dropdown and then some collapsible buttons, my question is how do I make this search bar appear in the in the expanded version of the navbar correctly and be hidden when the navbar is collapsed (alongside the buttons, leaving the notifications dropdown visable at all times)?
HTML:
<nav class="navbar navbar-expand-sm navbar-dark bg-dark">
<div class="container-fluid">
<a class="navbar-brand" href="#">My Site</a>
<form id="search" class="form-inline d-flex me-auto">
<input class="form-control" type="search" placeholder="Search"
aria-label="Search">
<button class="btn btn-outline-success" type="submit">Go</button>
</form>
<div class="d-flex">
<div class="dropdown">
<a class="btn btn-secondary me-1" role="button" id="dropdownMenuLink"
data-bs-toggle="dropdown" aria-expanded="false">
<div id="ex4">
<span class="p1 fa-stack fa-2x has-badge" data-count="0" id="badge">
<i class="p2 fa fa-bell fa-stack-1x xfa-inverse"></i>
</span>
</div>
</a>
<div class="dropdown-menu dropdown-menu-end">
<div id="notifications-header">
<h1>Notifications</h1>
</div>
<div id="notifications">
</div>
</div>
</div>
<button class="navbar-toggler ms-1" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav">
<li class="nav-item">
Button One
</li>
<li class="nav-item">
Button Two
</li>
<li class="nav-item">
<form name="button-three" class="ms-1 me-1 mt-2 mb-2">
<button type="submit" class="btn btn-danger">Button Three</button>
</form>
</li>
</ul>
</div>
</div>
</nav>
CSS:
#navbarSupportedContent {
max-width: intrinsic; /* Safari/WebKit uses a non-standard name */
max-width: -moz-fit-content; /* Firefox/Gecko */
max-width: -webkit-fit-content; /* Chrome */
max-width: fit-content;
}
.btn {
white-space: nowrap;
}
https://jsfiddle.net/tL09xuoy/
Anything that you want to not be shown in the navbar on smaller screens can be placed in a navbar-collapse division. Since you have your notifications icon between the search form and your other links, you’ll need to have separate collapse divisions. If you change the navbar toggle from working with an ID to working with a class name (I used . dual-collapse), then bootstrap will collapse everything.
For things you don’t want collapsed (like your notification icon) you can move that out of the collapsing content using flex order.
I switched the collapse point from your sm to md as things didn’t seem to be fitting nicely at the sm breakpoint, but you can change that back.
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" rel="stylesheet"/>
<script src="https://cdn.jsdelivr.net/npm/#popperjs/core#2.9.1/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.0.0-beta3/dist/js/bootstrap.min.js"></script>
<style>
#navbarSupportedContent {
max-width: intrinsic;
/* Safari/WebKit uses a non-standard name */
max-width: -moz-fit-content;
/* Firefox/Gecko */
max-width: -webkit-fit-content;
/* Chrome */
max-width: fit-content;
}
.btn-width-md {
width: 7.5rem
}
#media (min-width:768px) {
.btn-width-md {
width: auto;
}
}
.btn {
white-space: nowrap;
}
</style>
<nav class="navbar navbar-expand-md navbar-dark bg-dark">
<div class="container-fluid">
<div class=" flex-grow-1">
<a class="navbar-brand" href="#">My Site</a>
</div>
<div class="dual-collapse order-5 order-md-0 collapse navbar-collapse">
<form id="search" class="input-group form-inline my-3 my-md-0 me-auto">
<input class="form-control flex-grow-0 w-auto mr-md-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success" type="button" id="button-addon2"><i class="fa fa-search"></i></button>
</form>
</div>
<div class="dropdown order-2">
<a class="btn btn-secondary me-1" role="button" id="dropdownMenuLink" data-bs-toggle="dropdown" aria-expanded="false">
<div id="ex4">
<span class="p1 fa-lg has-badge" data-count="0" id="badge">
<i class="p2 fa fa-bell xfa-inverse"></i>
</span>
</div>
</a>
<div class="dropdown-menu dropdown-menu-end">
<div id="notifications">
<ul class="list-unstyled ps-1">
<li>Notification one</li>
<li>Notification two</li>
</ul>
</div>
</div>
</div>
<div class="dual-collapse order-4 collapse navbar-collapse flex-grow-0">
<ul class="navbar-nav">
<li class="nav-item">
Button One
</li>
<li class="nav-item">
Button Two
</li>
<li class="nav-item">
<form name="button-three" class="btn-width-md ms-1 me-1 mt-2 mb-2">
<button type="submit" class="btn btn-danger">Button Three</button>
</form>
</li>
</ul>
</div>
<div class="order-3">
<button class="navbar-toggler ms-1" type="button" data-bs-toggle="collapse" data-bs-target=".dual-collapse" aria-controls="dual-collapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</div>
</nav>

Bootstrap navbar menu not displayed on mobile

I am using bootstrap 4 to make a simple theme.
My problem is, that when I view the page on mobile, and click the menu button, the menu shows up for 1 second, and then hide it self. If I click the button gain, it wont show up.
Demo site here
My menu source code from the browser (I don't use the sticky classes)
<header class="header header-sticky- header-transparent__">
<div class="container">
<div class="row">
<div class="col-12">
<nav class="navbar navbar-expand-lg">
<!-- Logo START -->
<a class="navbar-brand" title="IQ Logistics Kft." href="https://kozetgyapot-arak.hu">
<img class="img-fluid" src="https://themes.potenzaglobalsolutions.com/html/bulky/images/logo.svg" alt="IQ Logistics Kft.">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav m-auto_">
<li class="nav-item"><a class="nav-link" title="Kezdőlap" href="https://kozetgyapot-arak.hu/">Kezdőlap</a></li><li class="nav-item"><a class="nav-link" title="Rólunk" href="https://kozetgyapot-arak.hu/rolunk">Rólunk</a></li><li class="nav-item"><a class="nav-link" title="Szolgáltatások" href="https://kozetgyapot-arak.hu/szolgaltatasok">Szolgáltatások</a></li><li class="nav-item"><a class="nav-link" title="Elérhetőségeink" href="https://kozetgyapot-arak.hu/elerhetosegeink">Elérhetőségeink</a></li> </ul>
</div>
<div class="mr-5 mr-lg-0 d-sm-flex d-none align-items-center">
<a class="btn btn-primary" href="https://kozetgyapot-arak.hu/arajanlat-kerese">Árajánlat kérése <i class="fa fa-chevron-right ml-1"></i></a>
</div>
</nav>
</div>
</div>
</div>
</header>
Thank you, if someone can help me.
It seems to work fine with this html. Note that I did leave out the Font Awesome stylesheet in the snippet below. Also note that the popper script is bundled in the bootstrap script so you heave to remove it from your project as an extra script.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#4.5.3/dist/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#4.5.3/dist/js/bootstrap.bundle.min.js"></script>
<header class="header header-sticky- header-transparent__">
<div class="container">
<div class="row">
<div class="col-12">
<nav class="navbar navbar-expand-lg navbar-light">
<a class="navbar-brand" title="IQ Logistics Kft." href="https://kozetgyapot-arak.hu">
<img class="img-fluid" src="https://themes.potenzaglobalsolutions.com/html/bulky/images/logo.svg" alt="IQ Logistics Kft.">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav m-auto">
<li class="nav-item"><a class="nav-link" title="Kezdőlap" href="https://kozetgyapot-arak.hu/">Kezdőlap</a></li>
<li class="nav-item"><a class="nav-link" title="Rólunk" href="https://kozetgyapot-arak.hu/rolunk">Rólunk</a></li>
<li class="nav-item"><a class="nav-link" title="Szolgáltatások" href="https://kozetgyapot-arak.hu/szolgaltatasok">Szolgáltatások</a></li>
<li class="nav-item"><a class="nav-link" title="Elérhetőségeink" href="https://kozetgyapot-arak.hu/elerhetosegeink">Elérhetőségeink</a></li>
</ul>
</div>
<div class="mr-5 mr-lg-0 d-sm-flex d-none align-items-center">
<a class="btn btn-primary" href="https://kozetgyapot-arak.hu/arajanlat-kerese">Árajánlat kérése <i class="fa fa-chevron-right ml-1"></i></a>
</div>
</nav>
</div>
</div>
</div>
</header>

Why does my col-x doesn't work as expected in bootstrap?

I am trying to add a Login button to my navbar in bootstrap, but when I add col-x to separate them equally, but they just cover 50% of the width of the navbar and nothing more. But when I use col-x outside then navbar it works perfectly.
The code
<!-- Navigation -->
<nav class="navbar navbar-dark navbar-expand-md bg-blue sticky-top">
<div class="container-fluid">
<div class="row">
<div class="col-4">
<a class="navbar-brand" href="#">
<h1 class="display-3">Petitions</h1>
</a>
</div>
<div class="col-4">
<button type="button" class="btn btn-primary btn-lg">
Get Started
</button>
</div>
<div class="col-4">
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarResponsive"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="#">Начало</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Цел на компанията</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">За компанията</a>
</li>
</ul>
</div></div>
</div>
</div>
</nav>
<!-- Navigation -->
I Think you want to make something like this:
<nav class="navbar navbar-dark navbar-expand-md sticky-top" style="background-color: #000000;">
<div class="container-fluid">
<div class="row" style="width: 100%; margin-left: 0px; margin-right: 0px;">
<div class="col-4">
<a class="navbar-brand" href="#">
<h1 class="display-3">Petitions</h1>
</a>
</div>
<div class="col-4">
<button type="button" class="btn btn-primary btn-lg">
Get Started
</button>
</div>
<div class="col-4">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="#">Начало</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Цел на компанията</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">За компанията</a>
</li>
</ul>
</div></div>
</div>
</div>
</nav>

Bootstrap navbar does toggle

I have the nav bar menu as below. one button for the menu on the left, and one button for the dropdown on the right. When the screen display in small screen the menu is always show but not collapsed.
When I click the button it doesn't collapse the menu.
Could you please advise?
<div class="container">
<div class="navbar navbar-light navbar-expand-lg logo-background container shadow">
<button class="sidebar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">>
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand navbar-brand-custom"><img src="Content/Jeo/images/logo.svg" alt="" class="logo-shape"/></a>
<div class="navbar-text navbar-text-custom">
<div class="application-name"><%=GetResource("Jeo")%></div>
<div class="application-name" style="margin-top: 4px"><%=GetResource("Management")%></div>
</div>
<div class="navbar-collapse collapse" id="navbarSupportedContent">
<div class="navbar__menu">
<ul class="navbar-nav">
<li class="nav-item navbar__menu-item active">
<a class="nav-link text-white" href="Default"><%=GetResource("JView")%></a>
</li>
<li class="nav-item navbar__menu-item">
<a class="nav-link text-white" href="TechView"><%=GetResource("TView")%></a>
</li>
</ul>
</div>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-collapse">
<span class="ua-icon-navbar-open navbar-toggler__open"></span>
<span class="ua-icon-alert-close navbar-toggler__close"></span>
</button>
<div class="dropdown navbar-dropdown" id="navbar-collapse">
<a class="dropdown-toggle navbar-dropdown-toggle navbar-dropdown-toggle__user caret-off" data-toggle="dropdown" href="#">
<asp:Image ID="ImgAvatar" runat="server" class="rounded-circle img-hover" Height="30px" Width="30px" />
</a>
<div class="dropdown-menu navbar-dropdown-menu navbar-dropdown-menu__user">
<asp:LinkButton ID="btnLanguageFrench" runat="server" class="dropdown-item" OnClick="btnLanguageFrench_Click"><%=GetResource("French")%><i class="fas fa-globe fa-pull-right dropdown-item-padding-top"></i></asp:LinkButton>
<asp:LinkButton ID="btnLanguageEnglish" runat="server" class="dropdown-item" OnClick="btnLanguageEnglish_Click"><%=GetResource("English")%><i class="fas fa-globe fa-pull-right dropdown-item-padding-top"></i></asp:LinkButton>
</div>
</div>
</div>
</div>
<div class="body-content">
<asp:ContentPlaceHolder ID="MainContent" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
Thank you
You can do that with only CSS, and media query to work only for small screen
#media (max-width: 680px) {
.navbar .dropdown-menu.yourclass {
display: block!important;
}
}
Jus add yourclass to that dropdown-menu which you want to keep opan always.
For more examples check http://bootstrap-menu.com