dropdown menu doesn't open - css

I use an affix navbar, that stays fixed on top when scrolling down. I did a lot of changes yesterday, but now the dropdown menu won't open (or at least show)... I can't figure out where the problem lies.
Can anyone see it?
Sooooo: I testet some things. The problem seems to be, that I have following scripts at the end of the body:
<!------------------------------------------------------------ VENDOR JS -->
<script src="<?= DIR_VENDOR ?>jquery/jquery-1.12.4.min.js"></script>
<script src="<?= DIR_VENDOR ?>bootstrap/bootstrap.min.js"></script>
<script type="text/javascript" src="<?= DIR_VENDOR ?>slider/bootstrap-slider.js"></script>
<!------------------------------------------------------------ SYSTEM JS -->
<script src="<?= DIR_LIBRARIES ?>js/ajax.js"></script>
<script src="<?= $system['template']['web_path'] ?>script.js"></script>
I needed that for bootstrap slider to work. Can you tell me which ones I need to put back in the header again for the dropdown as well as the slider to work?
/********************************************************************* HEADER */
div.header.container-fluid {
width: 100%;
background-image: url(gfx/2.jpg);
background-size: cover;
height: 85vh;
background-attachment: fixed;
}
/********************************************************************** AFFIX */
.affix + .container-fluid {
padding-top: 70px;
}
.affix-top {
background-color: #db091a;
}
.affix-top a {padding: 10px 15px 0px 15px !important;}
.affix {
top: 0;
width: 100%;
-webkit-transition: all .5s ease-in-out;
transition: all .5s ease-in-out;
background-color: #3b3b3b;
border-top: 3px solid #db091a;
}
.affix a {
padding-top: 7px !important;
-webkit-transition: all .5s ease-in-out;
transition: all .5s ease-in-out;
}
/********************************************************************* NAVBAR */
div.navbar.navbar-custom {
-webkit-box-shadow: 0px 2px 10px 0px rgba(77,74,77,1);
-moz-box-shadow: 0px 2px 10px 0px rgba(77,74,77,1);
box-shadow: 0px 2px 10px 0px rgba(77,74,77,1);
border-radius: 0px;
z-index: 1030;
}
/* HEADER */
a.header.navbar-brand {
font-family: Josefin Sans;
font-size: 45px;
text-transform: uppercase;
color: #FFF;
line-height: 50px;
}
/* TOP */
ul.nav.navbar-nav.top {float: right !important;}
a.top {
font-family: 'Palanquin', sans-serif;
text-transform: uppercase;
font-weight: 500;
color: white;
padding: 0px;
margin: 0px 0px 0px 30px;
border-bottom: 3px solid transparent;
}
/* USER */
a.dropdown-toggle.user {padding: 0px 15px 0px 0px; margin-left: 20px;}
span.glyphicon.glyphicon-user {
color: #3b3b3b;
background-color: white;
padding: 5px;
font-size: 30px;
}
/* DROPDOWN */
ul.dropdown-menu {padding: 0px;}
div.collapse.navbar-collapse {padding: 0px;}
ul.nav.navbar-nav.bottom {float: right !important;}
a.dropdown-toggle.drop {
font-family: 'Palanquin', sans-serif;
text-transform: uppercase;
font-weight: 500;
color: white;
padding: 0px;
margin: 0px 0px 5px 30px;
border-bottom: 3px solid transparent;
}
a.dropdown-toggle.drop:hover {border-bottom: 3px solid #db091a;}
a.dropdown-toggle.drop:active {border-bottom: 3px solid #db091a;}
a.dropdown-toggle.drop:focus {border-bottom: 3px solid #db091a;}
<!-- START: HEADER -->
<div class="header container-fluid hidden-xs">
</div>
<!-- START: NAVBAR -->
<div class="navbar navbar-custom" data-spy="affix" data-offset-top="500" id="anker">
<div class="container-fluid">
<div class="row" id="anchor">
<div class="col-sm-6">
<a class="header navbar-brand" href="#"><?= $language['phrases']['site_title']; ?></a>
<button type="button" class="navbar-toggle " data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse">
<div class="col-sm-6">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<span class="glyphicon glyphicon-user hidden-xs"></span> <span class="hidden-sm hidden-md hidden-lg hidden-xl"> Benutzer <b class="caret"></b> </span>
<ul class="dropdown-menu">
<li>beispiel1</li>
<li>beispiel2</li>
<li>beispiel3</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div class="row2">
<div class="container">
<div class="collapse navbar-collapse">
<div class="col-sm-12">
<ul class="nav navbar-nav bottom">
<li class="dropdown">
xMailer <b class="caret"></b>
<ul class="dropdown-menu">
<li>Advertiser</li>
<li>Kampagnen</li>
<li>Listen</li>
<li>Jobs</li>
<li>Nodes</li>
</ul>
</li>
<li class="dropdown">
Administration <b class="caret"></b>
<ul class="dropdown-menu">
<li>Konfigurationen</li>
<li>Module</li>
<li>Seiten</li>
<li>Navigation</li>
<li>Gruppen</li>
<li>Benutzer</li>
<li>Sprachen</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- END: NAVBAR -->

ok problem solved!
the scripts in the html body were the reason for the missing dropdown menu!

Related

Angular 8 components showing below sidebar instead of being on the side

I have a collapsible sidebar. On click of a link from the sidebar, I want to display the components next to the sidebar but they show below it.
My Component Code:
<app-topbar></app-topbar>
<div class="wrapper">
<app-sidebar></app-sidebar>
</div>
<div class="card" style="width: 18rem;">
<img class="card-img-top" src="assets/bn.jpg" alt="Card image cap">
<div class="card-body">
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
</div>
My Component's CSS:
.navbar{
background-color: #1F85DE;
}
.card{
flex: auto;
}
My Sidebar Component's HTML:
<nav id="sidebar" class="navbar-dark bg-#1F85DE" style="background-color: #1F85DE;" [ngClass]="{'hidden': sideNavService.hideSideNav }">
<hr>
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#">Home Page</a>
<hr>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link2</a>
<hr>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link3</a>
<hr>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Profile</a>
<hr>
</li>
</ul>
</nav>
My Sidebars's CSS:
:host {
background: #343a40;
}
#sidebar {
min-width: 200px;
max-width: 200px;
min-height: 100vh;
color: #fff;
transition: all 0.3s;
font-weight: 300;
font-size: 1rem;
line-height: 1.5;
}
#sidebar.hidden {
margin-left: -200px;
}
a[data-toggle="collapse"] {
position: relative;
}
#media (max-width: 575px) {
#sidebar {
margin-left: -200px;
}
#sidebar.hidden {
margin-left: 0;
}
}
a, a:hover, a:focus {
color: inherit;
}
#sidebar .sidebar-header {
padding: 20px;
}
#sidebar ul li a {
padding: 15px;
display: block;
width: 100%;
&:hover {
background-color: rgba(255, 255, 255, 0.1);
}
}
hr {
border-top: 1px solid #fff;
margin-top: 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;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu:hover>.dropdown-menu {
display: block;
}
.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: #ccc;
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #fff;
}
.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;
}
The code is making my Sidebar appear on the left side but the component that I want to display is not occupying the empty save on the right of the sidebar instead, after the sidebar ends, its occupying the save there.
<ng-sidebar-container>
<ng-sidebar [opened]="opened" position="right" mode="push" autoCollapseWidth=100>
<img src="assets/myimage_compressed.jpg" class="rounded-circle" width=80 height=80/>
<ul class="menu">
<li> <a routerLink="/">Dash Board</a></li>
<li> <a routerLink="/post">Post</a></li>
<li><a routerLink="/contact">Contact</a></li>
</ul>
</ng-sidebar>
<div ng-sidebar-content>
<!-- side page component ,Here i have used main component -->
<app-main></app-main>
</div>
</ng-sidebar-container>

How do I fix the push sidebar menu CSS?

I have a problem with a push sidebar menu. When the toggle button is clicked the page goes to the right .The problem is that I want the side bar menu to be next to the page just like the example that is in the picture . Also when i scroll down to the page ,I want the side bar menu to be fixed. I am only using css.
#media (max-width: 575px) {
.navbar-brand {
margin-bottom: 0;
}
.slideout-sidebar {
position: fixed;
top: 0px;
left: -80%;
height: 100%;
background-color: #fff;
transition: all .15s ease-in-out;
-webkit-box-shadow: inset -15px 0px 10px -15px rgba(0, 0, 0, 0.75);
box-shadow: inset -15px 0px 10px -15px rgba(0, 0, 0, 0.75);
}
.slideout-sidebar ul li {
display: block !important;
cursor: pointer;
padding: 10px 10px;
letter-spacing: 1px;
font-weight: 700;
font-size: 15px;
color: #0d6490;
margin: 0;
}
.slideout-sidebar button {
font-size: 1rem !important;
width: 220px;
height: 37px;
}
.navbar-brand {
width: 12rem;
height: 3.2rem;
margin-left: 50px;
}
.container-content {
position: relative;
left: 0px;
}
#menu-toggle {
display: none;
}
.menu-icon {
position: fixed;
top: 5px;
left: 5px;
font-size: 35px;
z-index: 1;
transition: all.15s ease-in-out;
padding: 5px 15px;
background-color: transparent;
}
#menu-toggle:checked ~ .slideout-sidebar {
left: 0;
}
#menu-toggle:checked + .menu-icon {
left: 250px;
}
#menu-toggle:checked ~ .container-content {
-webkit-transform: translateX(80%);
transform: translateX(80%);
transition: all .15s ease-in-out;
}
<input type="checkbox" id="menu-toggle" class="menu-icon" />
<label for="menu-toggle" class="menu-icon"><i class="fa fa-bars mt-2"></i></label>
<div class="container-content">
<header>
<div class="header-container d-flex justify-content-around container-fluid">
<div class="slideout-sidebar order-1">
<ul class="d-md-flex flex-md-column flex-lg-row mt-md-4">
<li class="brd mr-md-2 align-self-center menu">МЕНИ</li>
<li class=" order-lg-last btn-order"> <button class="btn" type="submit">НАРАЧАЈТЕ
ВЕДНАШ</button></li>
<li class="brd border-bottom border-top border-primary d-none ">КОНТАКТИРАЈТЕ НЕ</li>
<li class="brd d-none">УСЛОВИ ЗА КОРИСТЕЊЕ</li>
<li class=" border-bottom border-primary d-none brd">РЕСТОРАНИ</li>
<li class="order-lg-first mr-md-4 text-center brd align-self-center">
<a class="">МК</a>
<div class="d-inline-block
language-line"> | </div>
<a class="">EN</a>
</li>
</ul>
</div>
<div class="mx-auto mx-lg-0 mt-2">
<img src="./images/logo.png" alt="dominoslogo" class="navbar-brand" />
</div>
<div class="cart mt-2">
<img src="images/basket.png" alt="basket" class="d-lg-none">
<span class="header-cart-order d-lg-none">0</span>
</div>
</div>
</header>

CSS Multi-Level Accordion Menu

I have written some codes in HTML and CSS. The output is shown in the screenshot.
When a menu item is selected ( is expanded), the color section at the right side of the menu disapears while aforementioned menu is selected (after mouse is not hovering the item).
How to make the color stay even after the mouse is not over the menu?
(Please do not suggest any Java Script code.)
CSS Multi-Level Accordion Menu
* {
margin: 0;
padding: 0;
font-family: Arial;
font-size: 14px;
}
.block {
float: right;
max-width: 360px;
width: 100%;
height: 100%;
background-color: white;
overflow: hidden;
margin: 0;
}
.block > div {
display: block;
position: relative;
background-color: #fff;
color: #767676;
border-bottom: 1px solid #e5e5e5;
border-left: 1px solid #e5e5e5;
}
.block > div:nth-child(1):before {
font-family: 'FontAwesome';
content: "\F0CA";
font-size: 16px;
width: 50px;
font-weight: bold;
text-align: center;
position: absolute;
right: 0;
top: 0;
line-height: 50px;
margin: 0;
color: #767676;
border-right: 4px solid #E94B3B;
background: none; /* For browsers that do not support gradients */
background: -webkit-linear-gradient(to right, rgba(0,0,0,0) 50%, #E94B3B 50%); /* Safari 5.1-6.0 */
background: -o-linear-gradient(to right, rgba(0,0,0,0) 50%, #E94B3B 50%); /* For Opera 11.6-12.0 */
background: -moz-linear-gradient(to right, rgba(0,0,0,0) 50%, #E94B3B 50%); /* For Firefox 3.6-15 */
background: linear-gradient(to right, rgba(0,0,0,0) 50%, #E94B3B 50%); /* Standard syntax */
background-size: 200% 100%;
transition: all 0.25s ease-in-out;
}
.block > div:nth-child(1):hover:before {
background-position: 100% 0;
color: white;
}
.block > div:nth-child(2):before {
font-family: 'FontAwesome';
content: "\F0F6";
font-size: 16px;
width: 50px;
font-weight: bold;
text-align: center;
position: absolute;
right: 0;
top: 0;
line-height: 50px;
margin: 0;
color: #767676;
border-right: 4px solid #ffb61c;
background: none; /* For browsers that do not support gradients */
background: -webkit-linear-gradient(to right, rgba(0,0,0,0) 50%, #ffb61c 50%); /* Safari 5.1-6.0 */
background: -o-linear-gradient(to right, rgba(0,0,0,0) 50%, #ffb61c 50%); /* For Opera 11.6-12.0 */
background: -moz-linear-gradient(to right, rgba(0,0,0,0) 50%, #ffb61c 50%); /* For Firefox 3.6-15 */
background: linear-gradient(to right, rgba(0,0,0,0) 50%, #ffb61c 50%); /* Standard syntax */
background-size: 200% 100%;
transition: all 0.25s ease-in-out;
}
.block > div:nth-child(2):hover:before {
background-position: 100% 0;
color: white;
}
.block > div > input + label {
cursor: pointer;
display: block;
line-height: 50px;
background-color: white;
transition: background-color 0.5s;
color: #767676;
padding-right: 60px;
text-align: right;
}
.block > div > input ~ div {
visibility: hidden;
max-height: 0;
padding: 0;
opacity: 0;
transition: all 0.5s;
}
.block > div > input:checked + label {
background-color: #f3f3f3;
transition: background-color 0.5s;
color: black;
}
.block > div > input:checked ~ div {
display: block;
opacity: 1;
visibility: visible;
height: auto;
max-height: 10000px;
padding: 0;
transition: all 0.5s;
}
.block a {
display: block;
line-height: 50px;
text-decoration: none;
color: black;
border-top: solid 1px #e5e5e5;
padding-right: 50px;
text-align: right;
}
.block a:hover {
background: #eeeeee;
}
#font-face {
font-family: 'FontAwesome';
src: url('../fonts/FontAwesome.otf') format('opentype');
}
<div class="block">
<div>
<input type="radio" name="item" id="item-one" hidden />
<label for="item-one">First</label>
<div>
<p>Menu 1.1</p>
<p>Menu 1.2</p>
<p>Menu 1.3</p>
</div>
</div>
<div>
<input type="radio" name="item" id="item-two" hidden />
<label for="item-two">second</label>
<div>
<p>Menu 2.1</p>
<p>Menu 2.2</p>
<p>Menu 2.3</p>
</div>
</div>
</div>
You can refactor your HTML a bit so that the hover state is possible to achieve with :checked on your inputs instead.
First, replace the pseudo element on .block>div with a span element that goes after the label. We need something that's after the input so we can select it with CSS, since there is no CSS parent selector. And we can't use pseudo elements on inputs, so we'll just add a span instead.
<div class="block">
<div>
<input type="checkbox" name="item" id="item-one" hidden />
<label for="item-one">First</label>
<span></span>
<div>
<p>Menu 1.1</p>
<p>Menu 1.2</p>
<p>Menu 1.3</p>
</div>
</div>
</div>
Note that I took the little box symbol out of your content property from the pseudo element and jut put it in the span.
After that, it's just a matter of changing your selectors. So this...
.block > div:nth-child(1):before { ... }
.block > div:nth-child(1):hover:before { ... }
Becomes this...
#item-one + label + span { ... }
.block>div:nth-child(1):hover #item-one + label + span,
#item-one:checked + label + span { ... }
That's it!
You do need to add an explicit height on the span that was not there for the pseudo element, as well as set the span to display: block. The rest of the styles are exactly the same.
Final note is that I changed your inputs from type="radio" to type="checkbox". That way, you can collapse them instead of one being forced to be open all the time once you click one.
Here's a snippet where the first input uses the new style and the second one is the same as your original:
* {
margin: 0;
padding: 0;
font-family: Arial;
font-size: 14px;
}
.block {
float: right;
max-width: 360px;
width: 100%;
height: 100%;
background-color: white;
overflow: hidden;
margin: 0;
}
.block>div {
display: block;
position: relative;
background-color: #fff;
color: #767676;
border-bottom: 1px solid #e5e5e5;
border-left: 1px solid #e5e5e5;
}
#item-one + label + span {
display: block;
font-family: 'FontAwesome';
content: "\F0CA";
font-size: 16px;
width: 50px;
height: 50px;
font-weight: bold;
text-align: center;
position: absolute;
right: 0;
top: 0;
line-height: 50px;
margin: 0;
color: #767676;
border-right: 4px solid #E94B3B;
background: none;
/* For browsers that do not support gradients */
background: -webkit-linear-gradient(to right, rgba(0, 0, 0, 0) 50%, #E94B3B 50%);
/* Safari 5.1-6.0 */
background: -o-linear-gradient(to right, rgba(0, 0, 0, 0) 50%, #E94B3B 50%);
/* For Opera 11.6-12.0 */
background: -moz-linear-gradient(to right, rgba(0, 0, 0, 0) 50%, #E94B3B 50%);
/* For Firefox 3.6-15 */
background: linear-gradient(to right, rgba(0, 0, 0, 0) 50%, #E94B3B 50%);
/* Standard syntax */
background-size: 200% 100%;
transition: all 0.25s ease-in-out;
}
.block>div:nth-child(1):hover #item-one + label + span,
#item-one:checked + label + span {
background-position: 100% 0;
color: white;
}
.block>div:nth-child(2):before {
font-family: 'FontAwesome';
content: "\F0F6";
font-size: 16px;
width: 50px;
font-weight: bold;
text-align: center;
position: absolute;
right: 0;
top: 0;
line-height: 50px;
margin: 0;
color: #767676;
border-right: 4px solid #ffb61c;
background: none;
/* For browsers that do not support gradients */
background: -webkit-linear-gradient(to right, rgba(0, 0, 0, 0) 50%, #ffb61c 50%);
/* Safari 5.1-6.0 */
background: -o-linear-gradient(to right, rgba(0, 0, 0, 0) 50%, #ffb61c 50%);
/* For Opera 11.6-12.0 */
background: -moz-linear-gradient(to right, rgba(0, 0, 0, 0) 50%, #ffb61c 50%);
/* For Firefox 3.6-15 */
background: linear-gradient(to right, rgba(0, 0, 0, 0) 50%, #ffb61c 50%);
/* Standard syntax */
background-size: 200% 100%;
transition: all 0.25s ease-in-out;
}
.block>div:nth-child(2):hover:before {
background-position: 100% 0;
color: white;
}
.block>div>input+label {
cursor: pointer;
display: block;
line-height: 50px;
background-color: white;
transition: background-color 0.5s;
color: #767676;
padding-right: 60px;
text-align: right;
}
.block>div>input~div {
visibility: hidden;
max-height: 0;
padding: 0;
opacity: 0;
transition: all 0.5s;
}
.block>div>input:checked+label {
background-color: #f3f3f3;
transition: background-color 0.5s;
color: black;
}
.block>div>input:checked~div {
display: block;
opacity: 1;
visibility: visible;
height: auto;
max-height: 10000px;
padding: 0;
transition: all 0.5s;
}
.block a {
display: block;
line-height: 50px;
text-decoration: none;
color: black;
border-top: solid 1px #e5e5e5;
padding-right: 50px;
text-align: right;
}
.block a:hover {
background: #eeeeee;
}
#font-face {
font-family: 'FontAwesome';
src: url('../fonts/FontAwesome.otf') format('opentype');
}
<div class="block">
<div>
<input type="checkbox" name="item" id="item-one" hidden />
<label for="item-one">First</label>
<span></span>
<div>
<p>Menu 1.1</p>
<p>Menu 1.2</p>
<p>Menu 1.3</p>
</div>
</div>
<div>
<input type="checkbox" name="item" id="item-two" hidden />
<label for="item-two">second</label>
<div>
<p>Menu 2.1</p>
<p>Menu 2.2</p>
<p>Menu 2.3</p>
</div>
</div>
</div>
$('.t-blog-list-sidebar').find('li').click(function(e){
$('.t-blog-list-sidebar').find('li').removeClass('active');
// console.log(this, e);
$(this).addClass('active');
e.stopPropagation();
})
$("li.no-a").click(function(e){
$(this).toggleClass('rev');
$(this).children("ul").collapse('toggle');
e.stopPropagation();
} );
#import "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css";
#import "https://use.fontawesome.com/releases/v5.2.0/css/all.css";
.bg-grey{
background:#f5f5f5;
}.t-blog-list-sidebar ul:nth-child(2) li.no-a {
border: 1px solid #333;
}
section#t-page-title .t-sub-header {
margin-bottom: 30px;
}
#t-page-title .t-sub-header h2 {
font-weight: 400;
text-transform: uppercase;
}
.h-tab{
margin-top: 130px;
}
.h-tab .container span {
display: inline-block;
cursor: pointer;
padding: 28px 40px;
}
.h-tab .container a span h3 {
font-size: 27px;
text-transform: uppercase;
color: #fff;
}
.h-tab .container a span.active h3 {
font-weight: 500;
}
#t-page-title {
position: relative;
padding: 15px 0;
background-color: #F5F5F5;
border-bottom: 1px solid #EEE;
}
#t-page-title .breadcrumb {
position: absolute !important;
width: auto !important;
left: 15px !important;
margin: -5px 0 0 0 !important;
background-color: transparent !important;
padding: 0 !important;
font-size: 12px;
}
.h-tab .container span.active {
border-bottom: 7px solid #e87327;
box-shadow: 0px 0px 20px -2px #ffffff;
}
ul.t-ul-r {
float: right;
}
.t-recent-post {
width: 100%;
list-style-type: none;
}
.widget-sidebar li.t-recent-post .t-sub-header h3 i {
font-size: 32px;
padding-right: 5px;
}
.widget-sidebar li.t-recent-post .t-sub-header h3{
text-transform: uppercase;
}
.t-subbody ul.t-ul li:not(.no-a):hover {
cursor: pointer;
background: #e0e0e0;
}
.t-subbody ul.t-ul li {
line-height: 11px;
float: none;
padding-left: 21px;
padding: 4px;
color: #676666;
position: relative;
cursor: pointer;
}
.t-subbody .t-ul li:before {
content: "\f061";
font-family: 'Font Awesome 5 Free';
font-weight: 900;
font-style: normal;
padding-right: 2px;
font-size: 10px;
}
li> ul.t-ul {
padding-top: 13px;
transition: .5s;
}
#t-page-title {
margin-bottom: 16px;
}
.t-subbody .t-ul li.active:not(.no-a):after {
content: "\00a0";
width: 35px;
height: 35px;
background: #f5f5f5;
position: absolute;
transform: rotate(46deg);
right: -33px;
margin-top: -10px;
}
.t-subbody .t-ul li> ul li.active:not(.no-a):after {
right: -45px;
}
.t-subbody .t-ul li> ul li ul > li.active:not(.no-a):after {
right: -50px;
}
.t-subbody .t-ul li> ul li ul > li.active:not(.no-a):after {
right: -55px;
}
.t-subbody .t-ul li> ul li > ul li > ul li.active:not(.no-a):after {
right: -65px;
}
.t-subbody ul.t-ul li.no-a:after {
content: "\f107";
font-family: 'Font Awesome 5 Free';
font-weight: 900;
padding-right: 2px;
font-size: 18px;
position: absolute;
top:0;
font-style: normal;
right: 17px;
transition: .2s;
}
.t-subbody ul.t-ul li.no-a.rev:after {
transition: .2s;
transform: rotate(180deg);
}
.t-entry .entry-c {
background: #fff;
box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
position: relative;
padding: 24px;
border-radius: 2px;
margin: 20px 0;
}
li.t-recent-post p small {
display: block;
margin-top: 10px;
padding-bottom: 11px;
border-bottom: 1px solid #b9b9b9;
}
.t-blog-list-sidebar ul{
list-style:none;
padding-left:0px;
}
/* blog css end */
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<section class="section">
<div class="container ">
<div class="col-md-3 col-sm-3">
<div class="widget-sidebar">
<h2 class="title-widget-sidebar">TUTORIAL</h2>
<div class="t-blog-list-sidebar">
<ul>
<li class="t-recent-post">
<div class="t-sub-header">
<h3><i class="fab fa-java"></i> java</h3>
</div>
<div class="t-subbody">
<ul class="entry-meta clearfix t-ul">
<li class='active'> menu-1 </li>
<li> menu-2 </li>
<li class="no-a"> menu-3 start
<ul class="t-ul collapse">
<li>menu-3.1 </li>
<li class="no-a"> menu-3.2
<ul class="t-ul collapse">
<li class="no-a"> menu-3.2.1
<ul class="t-ul collapse">
<li> menu-3.2.1.1 </li>
<li> menu-3.2.1.2 </li>
</ul>
</li>
<li> menu-3.2.2 </li>
</ul>
</li>
<li> menu-3.3 </li>
</ul>
</li>
</ul>
</div>
<p><small><i class="fa fa-calendar" data-original-title="" title=""></i>15 November 2014</small> </p>
</li>
</ul>
<ul>
<li class="t-recent-post">
<div class="t-sub-header">
<h3><i class="fab fa-java"></i> java</h3>
</div>
<div class="t-subbody">
<ul class="entry-meta clearfix t-ul">
<li class='active'> menu-1 </li>
<li> menu-2 </li>
<li class="no-a"> menu-3 start
<ul class="t-ul collapse">
<li>menu-3.1 </li>
<li class="no-a"> menu-3.2
<ul class="t-ul collapse">
<li class="no-a"> menu-3.2.1
<ul class="t-ul collapse">
<li> menu-3.2.1.1 </li>
<li> menu-3.2.1.2 </li>
</ul>
</li>
<li> menu-3.2.2 </li>
</ul>
</li>
<li> menu-3.3 </li>
</ul>
</li>
</ul>
</div>
<p><small><i class="fa fa-calendar" data-original-title="" title=""></i>15 November 2014</small> </p>
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-9 col-sm-9 small-thumbs bg-grey">
<section id="t-page-title">
<div class="t-sub-header">
<h2><i class="fab fa-java"></i> java</h2>
</div>
<div class="container clearfix">
<div class="row">
<div class="col-md-12 col-xs-12 col-sm-12">
<ol class="breadcrumb">
<li>Tutorial </li>
<li class="active">java</li>
</ol>
</div>
</div>
</div>
</section>
<div class="clearfix t-entry">
<!-- card start -->
<div class="entry-c">
<div class="entry-title">
<h2>Android market in India</h2>
</div>
<div class="entry-content">
<p> </p>
<p class="MsoNormal"><span lang="EN-IN">India, as all know, is a land of diversity. A home to myriad cultures, this land has been binding them together,since decades. Year by year, time to time, as the country lurked somewhere on the map on technological growth, now is the time when it has emerged from hibernation. India today is a ripe market for all technological predators. From television to mobile phone; from laptops to phablets; Indians now have climbed the technological ladder, each time a rung higher.</span> </p>
<p></p>
</div>
<div class="row">
<div class="col-md-6 col-sm-6 col-xs-12">
<ul class="entry-meta clearfix t-ul">
<li><i class="icon-thumbs-up"></i> 12 </li>
<li><i class="icon-comments"></i> 24 </li>
</ul>
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
<ul class="entry-meta clearfix t-ul-r">
<li><i class="icon-calendar3"></i> 3:05 pm on Saturday 15 November 2014 </li>
</ul>
</div>
</div>
</div>
<div class="entry-c">
<div class="entry-title">
<h2>Android market in India</h2>
</div>
<div class="entry-content">
<p> </p>
<p class="MsoNormal"><span lang="EN-IN">India, as all know, is a land of diversity. A home to myriad cultures, this land has been binding them together,since decades. Year by year, time to time, as the country lurked somewhere on the map on technological growth, now is the time when it has emerged from hibernation. India today is a ripe market for all technological predators. From television to mobile phone; from laptops to phablets; Indians now have climbed the technological ladder, each time a rung higher.</span> </p>
<p></p>
</div>
<div class="row">
<div class="col-md-6 col-sm-6 col-xs-12">
<ul class="entry-meta clearfix t-ul">
<li><i class="icon-thumbs-up"></i> 12 </li>
<li><i class="icon-comments"></i> 24 </li>
</ul>
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
<ul class="entry-meta clearfix t-ul-r">
<li><i class="icon-calendar3"></i> 3:05 pm on Saturday 15 November 2014 </li>
</ul>
</div>
</div>
</div>
<div class="entry-c">
<div class="entry-title">
<h2>Android market in India</h2>
</div>
<div class="entry-content">
<p> </p>
<p class="MsoNormal"><span lang="EN-IN">India, as all know, is a land of diversity. A home to myriad cultures, this land has been binding them together,since decades. Year by year, time to time, as the country lurked somewhere on the map on technological growth, now is the time when it has emerged from hibernation. India today is a ripe market for all technological predators. From television to mobile phone; from laptops to phablets; Indians now have climbed the technological ladder, each time a rung higher.</span> </p>
<p></p>
</div>
<div class="row">
<div class="col-md-6 col-sm-6 col-xs-12">
<ul class="entry-meta clearfix t-ul">
<li><i class="icon-thumbs-up"></i> 12 </li>
<li><i class="icon-comments"></i> 24 </li>
</ul>
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
<ul class="entry-meta clearfix t-ul-r">
<li><i class="icon-calendar3"></i> 3:05 pm on Saturday 15 November 2014 </li>
</ul>
</div>
</div>
</div>
<div class="entry-c">
<div class="entry-title">
<h2>Android market in India</h2>
</div>
<div class="entry-content">
<p> </p>
<p class="MsoNormal"><span lang="EN-IN">India, as all know, is a land of diversity. A home to myriad cultures, this land has been binding them together,since decades. Year by year, time to time, as the country lurked somewhere on the map on technological growth, now is the time when it has emerged from hibernation. India today is a ripe market for all technological predators. From television to mobile phone; from laptops to phablets; Indians now have climbed the technological ladder, each time a rung higher.</span> </p>
<p></p>
</div>
<div class="row">
<div class="col-md-6 col-sm-6 col-xs-12">
<ul class="entry-meta clearfix t-ul">
<li><i class="icon-thumbs-up"></i> 12 </li>
<li><i class="icon-comments"></i> 24 </li>
</ul>
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
<ul class="entry-meta clearfix t-ul-r">
<li><i class="icon-calendar3"></i> 3:05 pm on Saturday 15 November 2014 </li>
</ul>
</div>
</div>
</div>
<!-- card start end-->
</div>
</div>
</div>
</section>

Dropdown bootstrap got separated

I tried to make dropdown bootstrap menu and there is border at the bottom of the dropdown using <hr>
the problem is the dropdown menu jump the
<hr>
line.
here is the html
<div class="container">
<div class="row">
<div class="col-md-8">
<b>Available at :</b>
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
List<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
#foreach ($listings as $listing)
<li>Text</li><br>
#endforeach
</ul>
<hr>
</div>
under dropdown styling, there is top : 100% if I untick it, the dropdown list display correctly.
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 160px;
padding: 5px 0;
margin: 2px 0 0;
font-size: 14px;
text-align: left;
list-style: none;
background-color: #fff;
-webkit-background-clip: padding-box;
background-clip: padding-box;
border: 1px solid #ccc;
border: 1px solid rgba(0,0,0,.15);
border-radius: 4px;
-webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175);
box-shadow: 0 6px 12px rgba(0,0,0,.175);
Anyone know how to fix this so the dropdown will display exactly at the bottom of Available at :List ?
more like this
You could use top: 20px; left: 15px; instead of top: 100%; left: 0; in your css. this would fix your problem.
Look here: http://www.bootply.com/qyGxdV9m0t#
I fixed this with adding <div class="col-md-12"> before the dropdown. and another <div class="col-md-12"> for <hr>

Bootstrap 3 auto centering and auto padding the whole page by default?

TB3 here, and here's my jsfiddle. As you can see, all the content (the header, the main body and the footer) seem to be contained inside something that is causing it to be padded + centered. I would like all this content to take up 100% the width of the page/viewport.
I suspect that it may have something to do with the navbar:
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
...
...perhaps these classes "auto-pad" and "auto-center" by default and need to be overwritten? Any ideas as to where I'm going awry?
You need to remove the overall "container" to container-fluid that you have at the start of your document because that is what is containing and making it center.
$('.orgSelector').dropdown();
$('.orgSelector').tooltip();
.acLogo {
background-image : url("http://placehold.it/250x150");
}
.form-signin {
max-width: 330px;
padding: 15px;
margin: 0 auto
}
.form-signin .form-signin-heading, .form-signin .checkbox {
margin-bottom: 10px;
}
.form-signin .checkbox {
font-weight: normal;
}
.form-signin .form-control {
position: relative;
font-size: 16px;
height: auto;
padding: 10px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.form-signin .form-control:focus {
z-index: 2;
}
.form-signin input[type="text"] {
margin-bottom: -1px;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.form-signin input[type="password"] {
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.account-wall {
margin-top: 20px;
padding: 40px 0px 20px 0px;
background-color: #f7f7f7;
-moz-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
}
.login-title {
color: #555;
font-size: 18px;
font-weight: 400;
display: block;
}
.profile-img {
width: 96px;
height: 96px;
margin: 0 auto 10px;
display: block;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
border-radius: 50%;
}
.need-help {
margin-top: 10px;
}
.new-account {
display: block;
margin-top: 10px;
}
img.user-summary {
max-width: 100%;
height: auto;
}
div.user-summary {
margin: 10px auto;
}
div.user-summary > img {
width: 80px;
height: 80px;
float: left;
margin: 0 5px;
}
div.user-name {
margin: 15px 0 0 0;
font-style: italic;
display: block;
}
div.user-status {
font-weight: bold;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<div class="container-fluid">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand acLogo" style="height:auto; width:50%;" href="/"></a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><b>FEATURES</b></li>
<li><b>COMPARE US</b></li>
<li><b>FIZZBUZZ</b></li>
<li><b>FOOBAR</b></li>
<li><b>DOCS</b></li>
</ul>
<form class="navbar-form navbar-right" action="/app/dashboard/search" method="POST">
<ul class="nav navbar-nav navbar-right">
<li><button type="button" class="btn btn-success">Sign up</button></li>
<li><a href="/app/dashboard">
<button type="button" class="btn btn-link">Sign in</button>
</a></li>
</ul>
</form>
</div>
</div>
</nav>
</div>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>

Resources