Cant make my Plus and Minus operate properly with buttons - html

I'm trying to use a button in one accordion to expand the next (or another down the line), but the plus and minus sign on the right aren't working properly.
When you click the accordion headings themselves, the plus and minus signs work properly to show if an accordion has been expanded or not. However, it sometimes shows the wrong character after using the buttons inside the accordions.
I don't know enough about CSS yet to figure out why this is happening.
What's going wrong and how can I fix it?
.container {
margin-right: 5px;
margin-left: 5px;
display: inline;
}
.rapanel-group .rapanel-heading+.rapanel-collapse>.rapanel-body {
border: 1px solid #ddd;
}
.rapanel-group,
.rapanel-group .panel,
.rapanel-group .rapanel-heading,
.rapanel-group .rapanel-heading a,
.rapanel-group .rapanel-title,
.rapanel-group .rapanel-title a,
.rapanel-group .rapanel-body,
.rapanel-group .rapanel-group .rapanel-heading+.rapanel-collapse>.rapanel-body {
border-radius: 5px;
border: 0;
margin: 1px 0px 1px 0px;
background-color: #ededed;
}
.rapanel-text {
margin-left: 30px;
margin-right: 30px;
display: inline-block;
font-size: 15px;
}
.rapanel-group .rapanel-heading {
padding: 0px;
}
.rapanel-group .rapanel-heading a {
display: block;
background: #1998d5;
color: #ffffff;
padding: 10px;
text-decoration: none;
position: relative;
border-radius: 5px;
text-align: center;
}
.rapanel-group:hover .rapanel-heading a:hover {
background: #1777a9;
}
.rapanel-group .rapanel-heading a.collapsed {
background: #eeeeee;
color: #ffffff;
background: #1998d5;
text-align: center;
}
.rapanel-group .rapanel-heading a:after {
content: '-';
position: absolute;
right: 20px;
top: 5px;
font-size: 20px;
}
.rapanel-group .rapanel-heading a.collapsed:after {
content: '+';
}
.raabc {
position: absolute;
left: 20px;
}
.rapanel-group .rapanel-collapse {
margin-top: 0px !important;
}
.rapanel-group .rapanel-body {
background: #ededed;
padding: 5px;
}
.rapanel-group .rapanel {
background-color: transparent;
}
.rapanel-group .rapanel-body p:last-child,
.rapanel-group .rapanel-body ul:last-child,
.rapanel-group .rapanel-body ol:last-child {
margin-bottom: 0;
}
/*RA Button Section*/
.rabutton {
display: block;
position: relative;
width: 100%;
background: #ffffff;
border: 1px solid #1998d5;
color: #222222;
font-weight: 500;
font-size: 12px;
text-align: left;
padding: 6px 25px 6px 25px;
border-radius: 5px;
margin: 3px 1px 1px 0px;
}
.rabtnspan {
position: absolute;
color: #1997d5;
right: 10px;
top: 3px;
}
a.rabutton {
text-decoration: none;
}
a.rabutton:hover {
color: #222222;
background: #fffff0;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<div class="container">
<div class="rapanel-group" id="accordionappIssues140">
<div class="panel rapanel-default">
<div class="rapanel-heading">
<h4 class="rapanel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordionappIssues140" href="#collapseappIssues140OneA"><span class="raabc"></span><span class="rapanel-text">
a
</span></a></h4>
</div>
<div id="collapseappIssues140OneA" class="rapanel-collapse collapse">
<div class="rapanel-body">
<div class="ratooltip">
<a class="rabutton" data-toggle="collapse" data-parent="#accordionappIssues140" href="#collapseappIssues140TwoB"><span class="rabtnspan">➜</span>Button</a>
</div>
</div>
</div>
</div>
<div class="panel rapanel-default">
<div class="rapanel-heading">
<h4 class="rapanel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordionappIssues140" href="#collapseappIssues140TwoB"><span class="raabc"></span><span class="rapanel-text">
b
</span></a></h4>
</div>
<div id="collapseappIssues140TwoB" class="rapanel-collapse collapse">
<div class="rapanel-body">
<div class="ratooltip">
<a class="rabutton" data-toggle="collapse" data-parent="#accordionappIssues140" href="#collapseappIssues140ThreeC"><span class="rabtnspan">➜</span>Button</a>
</div>
</div>
</div>
</div>
<div class="panel rapanel-default">
<div class="rapanel-heading">
<h4 class="rapanel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordionappIssues140" href="#collapseappIssues140ThreeC"><span class="raabc"></span><span class="rapanel-text">
c
</span></a></h4>
</div>
<div id="collapseappIssues140ThreeC" class="rapanel-collapse collapse">
<div class="rapanel-body">
<div class="ratooltip">
<a class="rabutton" data-toggle="collapse" data-parent="#accordionappIssues140" href="#collapseappIssues140FourD"><span class="rabtnspan">➜</span>Button</a>
</div>
</div>
</div>
</div>
<div class="panel rapanel-default">
<div class="rapanel-heading">
<h4 class="rapanel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordionappIssues140" href="#collapseappIssues140FourD"><span class="raabc"></span><span class="rapanel-text">
d
</span></a></h4>
</div>
<div id="collapseappIssues140FourD" class="rapanel-collapse collapse">
<div class="rapanel-body">
<div class="ratooltip">
<a class="rabutton" data-toggle="collapse" data-parent="#accordionappIssues140" href="#collapseappIssues140FiveE"><span class="rabtnspan">➜</span>Button</a>
</div>
</div>
</div>
</div>
<div class="panel rapanel-default">
<div class="rapanel-heading">
<h4 class="rapanel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordionappIssues140" href="#collapseappIssues140FiveE"><span class="raabc"></span><span class="rapanel-text">
e
</span></a></h4>
</div>
<div id="collapseappIssues140FiveE" class="rapanel-collapse collapse">
<div class="rapanel-body">
<div class="ratooltip">
<a class="rabutton" data-toggle="collapse" data-parent="#accordionappIssues140" href="#collapseappIssues140OneA"><span class="rabtnspan">➜</span>Button</a>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
View on JSFiddle

Related

How to make the addition of new maps side by side horizontally?

I'm using Bootstrap 3.3.7 and Angular 5.2.0. I have a loop with the addition of a new entry. Entries are added to "cards". But the problem is that they are now added vertically. And how can I make it so that they are added all along the horizontally by about 5 "cards" in a row as a new record is added ie 6 was transferred to a new row.
html and all css on the cards: :
.card{
display: inline-block;
position: relative;
width: 100%;
margin: 25px 0;
box-shadow: 0 1px 4px 0 rgba(0,0,0,0.14);
border-radius: $border-radius-base;
color: $mdb-card-body-text;
background: $mdb-card-body-background;
.card-height-indicator {
margin-top: 100%;
}
.title{
margin-top: 0;
margin-bottom: 5px;
}
.card-image {
height: 60%;
position: relative;
overflow: hidden;
margin-left: 15px;
margin-right: 15px;
margin-top: -30px;
border-radius: $border-radius-large;
img {
width: 100%;
height: 100%;
border-radius: $border-radius-large;
pointer-events: none;
}
.card-title {
position: absolute;
bottom: 15px;
left: 15px;
color: $mdb-card-image-headline;
font-size: $font-size-h4;
text-shadow: 0 2px 5px rgba(33, 33, 33, 0.5);
}
}
.category:not([class*="text-"]){
color: $gray-color;
}
.card-content{
padding: 15px 20px;
.category{
margin-bottom: 0;
}
}
.card-header{
#include shadow-big();
margin: -20px $margin-base 0;
border-radius: $border-radius-base;
padding: $padding-base;
background-color: $gray-color;
.title{
color: $white-color;
}
.category{
margin-bottom: 0;
color: rgba($white-color, .62);
}
&.card-chart{
padding: 0;
min-height: 160px;
+ .content{
h4{
margin-top: 0;
}
}
}
.ct-label{
color: rgba($white-color, .7);
}
.ct-grid{
stroke: rgba(255, 255, 255, 0.2);
}
.ct-series-a .ct-point,
.ct-series-a .ct-line,
.ct-series-a .ct-bar,
.ct-series-a .ct-slice-donut{
stroke: rgba(255,255,255,.8);
}
.ct-series-a .ct-slice-pie,
.ct-series-a .ct-area{
fill: rgba(255,255,255,.4);
}
}
.chart-title{
position: absolute;;
top: 25px;
width: 100%;
text-align: center;
h3{
margin: 0;
color: $white-color;
}
h6{
margin: 0;
color: rgba(255,255,255, .4);
}
}
.card-footer{
margin: 0 20px 10px;
padding-top: 10px;
border-top: 1px solid #eeeeee;
.content{
display: block;
}
div{
display: inline-block;
}
.author{
color: $gray-color;
}
.stats{
line-height: 22px;
color: $gray-color;
font-size: $font-size-small;
.material-icons{
position: relative;
top: 4px;
font-size: $font-paragraph;
}
}
h6{
color: $gray-color;
}
}
img{
width: 100%;
height: auto;
}
.category{
.material-icons{
position: relative;
top: 6px;
line-height: 0;
}
}
.category-social{
.fa{
font-size: 24px;
position: relative;
margin-top: -4px;
top: 2px;
margin-right: 5px;
}
}
.author{
.avatar{
width: 30px;
height: 30px;
overflow: hidden;
border-radius: 50%;
margin-right: 5px;
}
a{
color: $black-color;
text-decoration: none;
.ripple-container{
display: none;
}
}
}
.table{
margin-bottom: 0;
tr:first-child td{
border-top: none;
}
}
[data-background-color="purple"]{
background: linear-gradient(60deg, $purple-400, $purple-600);
#include shadow-big-color($brand-primary);
}
[data-background-color="blue"]{
background: linear-gradient(60deg, $blue-900, $blue-900);
#include shadow-big-color($brand-info);
}
[data-background-color="green"]{
background: linear-gradient(60deg, $green-400, $green-600);
#include shadow-big-color($brand-success);
}
[data-background-color="orange"]{
background: linear-gradient(60deg, $orange-400, $orange-600);
#include shadow-big-color($brand-warning);
}
[data-background-color="red"]{
background: linear-gradient(60deg, $red-400, $red-600);
#include shadow-big-color($brand-danger);
}
[data-background-color]{
color: $white-color;
a{
color: $white-color;
}
}
}
.card-stats{
.title{
margin: 0;
}
.card-header{
float: left;
text-align: center;
i{
font-size: 36px;
line-height: 56px;
width: 56px;
height: 56px;
}
}
.card-content{
text-align: right;
padding-top: 10px;
}
}
.card-nav-tabs{
.header-raised{
margin-top: -$margin-base * 2;
}
.nav-tabs{
background: transparent;
padding: 0;
}
.nav-tabs-title{
float: left;
padding: 10px 10px 10px 0;
line-height: 24px;
}
}
.card-plain{
background: transparent;
box-shadow: none;
.card-header{
margin-left: 0;
margin-right: 0;
}
.content{
padding-left: 5px;
padding-right: 5px;
}
.card-image{
margin: 0;
border-radius: $border-radius-base;
img{
border-radius: $border-radius-base;
}
}
}
.iframe-container{
margin: 0 -20px 0;
iframe{
width: 100%;
height: 500px;
border: 0;
#include shadow-big();
}
}
.card-profile,
.card-testimonial{
margin-top: 30px;
text-align: center;
.btn-just-icon.btn-raised{
margin-left: 6px;
margin-right: 6px;
}
.card-avatar{
max-width: 130px;
max-height: 130px;
margin: -50px auto 0;
border-radius: 50%;
overflow: hidden;
#include shadow-big();
& + .content{
margin-top: 15px;
}
}
&.card-plain{
.card-avatar{
margin-top: 0;
}
}
}
<div class="col-lg-3 col-md-6 col-sm-6">
<div *ngFor="let note of notes" >
<div class="card-header" data-background-color="blue">
<i class="material-icons">store</i>
</div>
<div class="card-content" >
<p class="category">{{note.name}} </p>
</div>
<div class="card-footer">
<div class="stats">
<button class="button-save" ><i class="fa fa-eye"></i></button>
<button class="button-trash" ><i class="fa fa-trash"></i></button>
</div>
</div>
</div>
</div>
Add the *ngFor on the following element
<div class="col-lg-3 col-md-6 col-sm-6" *ngFor="let note of notes">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div class="container">
<div class="row">
<div class="col-lg-3 col-md-6 col-sm-6" *ngFor="let note of notes">
<div class="card-header" data-background-color="blue">
<i class="material-icons">store</i>
</div>
<div class="card-content">
<p class="category">{{note.name}} </p>
</div>
<div class="card-footer">
<div class="stats">
<button class="button-save"><i class="fa fa-eye"></i></button>
<button class="button-trash"><i class="fa fa-trash"></i></button>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-sm-6" *ngFor="let note of notes">
<div class="card-header" data-background-color="blue">
<i class="material-icons">store</i>
</div>
<div class="card-content">
<p class="category">{{note.name}} </p>
</div>
<div class="card-footer">
<div class="stats">
<button class="button-save"><i class="fa fa-eye"></i></button>
<button class="button-trash"><i class="fa fa-trash"></i></button>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-sm-6" *ngFor="let note of notes">
<div class="card-header" data-background-color="blue">
<i class="material-icons">store</i>
</div>
<div class="card-content">
<p class="category">{{note.name}} </p>
</div>
<div class="card-footer">
<div class="stats">
<button class="button-save"><i class="fa fa-eye"></i></button>
<button class="button-trash"><i class="fa fa-trash"></i></button>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-sm-6" *ngFor="let note of notes">
<div class="card-header" data-background-color="blue">
<i class="material-icons">store</i>
</div>
<div class="card-content">
<p class="category">{{note.name}} </p>
</div>
<div class="card-footer">
<div class="stats">
<button class="button-save"><i class="fa fa-eye"></i></button>
<button class="button-trash"><i class="fa fa-trash"></i></button>
</div>
</div>
</div>
<div class="col-lg-3 col-md-6 col-sm-6" *ngFor="let note of notes">
<div class="card-header" data-background-color="blue">
<i class="material-icons">store</i>
</div>
<div class="card-content">
<p class="category">{{note.name}} </p>
</div>
<div class="card-footer">
<div class="stats">
<button class="button-save"><i class="fa fa-eye"></i></button>
<button class="button-trash"><i class="fa fa-trash"></i></button>
</div>
</div>
</div>
</div>
</div>
You need to modify the Bopotstrap grid structure to incorporate 5 columns in a row. Try using the following structure, you will be able to get what you want.
.col.col-2 {
flex: 0 0 20%;
max-width: 20%;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css" rel="stylesheet" />
<div class="container">
<div class="row">
<div class="col col-2">
1 columns
</div>
<div class="col col-2">
2 columns
</div>
<div class="col col-2">
3 columns
</div>
<div class="col col-2">
4 columns
</div>
<div class="col col-2">
5 columns
</div>
<div class="col col-2">
6 columns
</div>
</div>
</div>

Bootstrap Vertical timeline to Horizontal timeline

I have created a vertical timeline that needs to be changed completely into horizontal timeline I'm trying to get it horizontal but it doesn't work as expected.
Posted the complete CSS & HTML code also link to codepen of the current progress.
Also, the timeline needs to be responsive in horizontal view.
Link
https://codepen.io/anon/pen/yvPLrP
#Timline {
background-color: #FFFFFF;
}
.Timline-wrapper {
position: relative;
clear: both;
overflow: hidden;
}
.Timline-wrapper:nth-of-type(odd) .Timline-item {
padding-left: 100px;
padding-right: 0;
padding-bottom: 50px;
float: right;
}
.Timline-wrapper:nth-of-type(odd) .Timline-box:after {
left: -20px;
right: auto;
border-color: transparent;
text-align: left;
border-right: 10px solid #fff;
border-left-color: transparent !important;
}
.Timline-wrapper:nth-of-type(odd) .Timline-icon {
right: auto;
left: -32px;
}
.Timline-wrapper:nth-of-type(odd) .Timline-year {
text-align: right;
right: 140%;
left: auto;
}
.Timline-holder:before {
content: '';
position: absolute;
top: 0;
left: 50%;
margin-left: -4px;
height: 100%;
width: 4px;
background: #939393;
opacity: 0.5;
}
.Timline-item {
padding-right: 100px;
padding-bottom: 50px;
padding-top: 50px;
}
.Timline-year {
top: 40px;
position: absolute;
width: 100%;
left: 140%;
}
.Timline-year>* {
margin: 0;
}
.Timline-icon {
border-radius: 50%;
background: #fff;
position: absolute;
width: 60px;
height: 60px;
right: -28px;
top: 72px;
z-index: 9;
cursor: pointer;
border: 2px solid transparent;
transition: all 0.3s ease-in-out;
}
.Timline-icon:before {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.Timline-icon:hover {
color: #E3000F;
border: 2px solid #E3000F;
transform: translateY(-6px);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}
.Timline-box {
background-color: #fff;
padding: 15px;
position: relative;
}
.Timline-box h3,
.Timline-box h5 {
text-transform: capitalize;
}
.Timline-box:after {
content: "";
display: block;
position: absolute;
right: -20px;
top: 40px;
border: 10px solid transparent;
border-left: 10px solid #fff;
}
.Timline-box:hover {
cursor: pointer;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}
.Timline-box:hover+.Timline-icon {
color: #E3000F;
border: 2px solid #E3000F;
transform: translateY(-6px);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
}
.Timline-box {
background-color: #fff;
padding: 15px;
}
/* Timline Responsive */
#media (min-width: 992px) and (max-width: 1024px) {
.Timline-year {
left: 152%;
}
.Timline-wrapper:nth-of-type(odd) .Timline-year {
right: 152%;
}
}
#media (max-width: 768px) {
.Timline-item {
padding-right: 15px;
margin-left: 65px;
padding-top: 20px;
}
.Timline-holder:before {
left: 37px;
}
.Timline-icon {
left: -60px;
right: auto;
top: 42px;
}
.Timline-year {
position: relative;
top: 0;
left: 0;
}
.Timline-box:after {
left: -20px;
right: auto;
border-color: transparent;
text-align: left;
border-right: 10px solid #fff;
border-left-color: transparent !important;
}
.Timline-wrapper:nth-of-type(odd) .Timline-item {
padding-right: 15px;
padding-left: 15px;
margin-left: 65px;
float: none;
}
.Timline-wrapper:nth-of-type(odd) .Timline-icon {
left: -60px;
right: auto;
}
.Timline-wrapper:nth-of-type(odd) .Timline-year {
position: relative;
top: 0;
left: 0;
text-align: left;
}
}
<!-- Timline Section -->
<section id="Timline">
<div class="container">
<div class="section-content">
<div class="row">
<!-- Section Title -->
<div class="col-md-12 section-title text-center">
<span class="divider center"></span>
<h2>Timline</h2>
</div>
<!-- End of Section Title -->
<!-- Timline-1 -->
<div class="Timline-wrapper">
<div class="col-md-12 Timline-holder">
<div class="row">
<div class="col-md-6 col-sm-12 Timline-item">
<div class="Timline-box" data-aos="fade-right">
<h3>One</h3>
</div>
<i class=" Timline-icon fa fa-2x fa-paint-brush"></i>
</div>
</div>
</div>
</div>
<!-- End of Timline-1 -->
<!-- Timline-2 -->
<div class="Timline-wrapper">
<div class="col-md-12 Timline-holder">
<div class="row">
<div class="col-md-6 col-sm-12 Timline-item">
<div class=" Timline-box" data-aos="fade-right">
<h3>Two</h3>
</div>
<i class=" Timline-icon fa fa-2x fa-star"></i>
</div>
</div>
</div>
</div>
<!-- End of Timline-2 -->
<!-- Timline-3 -->
<div class="Timline-wrapper">
<div class="col-md-12 Timline-holder">
<div class="row">
<div class="col-md-6 col-sm-12 Timline-item">
<div class=" Timline-box" data-aos="fade-right">
<h3>Three</h3>
</div>
<i class=" Timline-icon fa fa-2x fa-lightbulb-o"></i>
</div>
</div>
</div>
</div>
<!-- End of Timline-3 -->
<!-- Timline-4 -->
<div class="Timline-wrapper">
<div class="col-md-12 Timline-holder">
<div class="row">
<div class="col-md-6 col-sm-12 Timline-item">
<div class=" Timline-box" data-aos="fade-right">
<h3>Four</h3>
</div>
<i class=" Timline-icon fa fa-2x fa-star"></i>
</div>
</div>
</div>
</div>
<!-- End of Timline-4 -->
<!-- Timline-5 -->
<div class="Timline-wrapper">
<div class="col-md-12 Timline-holder">
<div class="row">
<div class="col-md-6 col-sm-12 Timline-item">
<div class=" Timline-box" data-aos="fade-right">
<h3>Five</h3>
</div>
<i class=" Timline-icon fa fa-2x fa-paint-brush"></i>
</div>
</div>
</div>
</div>
<!-- End of Timline-5 -->
<!-- Timline-6 -->
<div class="Timline-wrapper">
<div class="col-md-12 Timline-holder">
<div class="row">
<div class="col-md-6 col-sm-12 Timline-item">
<div class=" Timline-box" data-aos="fade-right">
<h3>Six</h3>
</div>
<i class=" Timline-icon fa fa-2x fa-star"></i>
</div>
</div>
</div>
</div>
<!-- End of Timline-6 -->
<!-- Timline-7 -->
<div class="Timline-wrapper">
<div class="col-md-12 Timline-holder">
<div class="row">
<div class="col-md-6 col-sm-12 Timline-item">
<div class=" Timline-box" data-aos="fade-right">
<h3>Seven</h3>
</div>
<i class=" Timline-icon fa fa-2x fa-lightbulb-o"></i>
</div>
</div>
</div>
</div>
<!-- End of Timline-7 -->
<!-- Timline-8 -->
<div class="Timline-wrapper">
<div class="col-md-12 Timline-holder">
<div class="row">
<div class="col-md-6 col-sm-12 Timline-item">
<div class=" Timline-box" data-aos="fade-right">
<h3>Eight</h3>
</div>
<i class=" Timline-icon fa fa-2x fa-star"></i>
</div>
</div>
</div>
</div>
<!-- End of Timline-8 -->
<!-- Timline-9 -->
<div class="Timline-wrapper">
<div class="col-md-12 Timline-holder">
<div class="row">
<div class="col-md-6 col-sm-12 Timline-item">
<div class=" Timline-box" data-aos="fade-right">
<h3>Nine</h3>
</div>
<i class=" Timline-icon fa fa-2x fa-lightbulb-o"></i>
</div>
</div>
</div>
</div>
<!-- End of Timline-9 -->
</div>
</div>
</div>
</section>
<!-- End of Timline Section -->
You can modify this based on your requirement
/* Timeline */
.timeline,
.timeline-horizontal {
list-style: none;
padding: 20px;
position: relative;
}
.timeline:before {
top: 40px;
bottom: 0;
position: absolute;
content: " ";
width: 3px;
background-color: #eeeeee;
left: 50%;
margin-left: -1.5px;
}
.timeline .timeline-item {
margin-bottom: 20px;
position: relative;
}
.timeline .timeline-item:before,
.timeline .timeline-item:after {
content: "";
display: table;
}
.timeline .timeline-item:after {
clear: both;
}
.timeline .timeline-item .timeline-badge {
color: #fff;
width: 54px;
height: 54px;
line-height: 52px;
font-size: 22px;
text-align: center;
position: absolute;
top: 18px;
left: 50%;
margin-left: -25px;
background-color: #7c7c7c;
border: 3px solid #ffffff;
z-index: 100;
border-top-right-radius: 50%;
border-top-left-radius: 50%;
border-bottom-right-radius: 50%;
border-bottom-left-radius: 50%;
}
.timeline .timeline-item .timeline-badge i,
.timeline .timeline-item .timeline-badge .fa,
.timeline .timeline-item .timeline-badge .glyphicon {
top: 2px;
left: 0px;
}
.timeline .timeline-item .timeline-badge.primary {
background-color: #1f9eba;
}
.timeline .timeline-item .timeline-badge.info {
background-color: #5bc0de;
}
.timeline .timeline-item .timeline-badge.success {
background-color: #59ba1f;
}
.timeline .timeline-item .timeline-badge.warning {
background-color: #d1bd10;
}
.timeline .timeline-item .timeline-badge.danger {
background-color: #ba1f1f;
}
.timeline .timeline-item .timeline-panel {
position: relative;
width: 46%;
float: left;
right: 16px;
border: 1px solid #c0c0c0;
background: #ffffff;
border-radius: 2px;
padding: 20px;
-webkit-box-shadow: 0 1px 6px rgba(0, 0, 0, 0.175);
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.175);
}
.timeline .timeline-item .timeline-panel:before {
position: absolute;
top: 26px;
right: -16px;
display: inline-block;
border-top: 16px solid transparent;
border-left: 16px solid #c0c0c0;
border-right: 0 solid #c0c0c0;
border-bottom: 16px solid transparent;
content: " ";
}
.timeline .timeline-item .timeline-panel .timeline-title {
margin-top: 0;
color: inherit;
}
.timeline .timeline-item .timeline-panel .timeline-body>p,
.timeline .timeline-item .timeline-panel .timeline-body>ul {
margin-bottom: 0;
}
.timeline .timeline-item .timeline-panel .timeline-body>p+p {
margin-top: 5px;
}
.timeline .timeline-item:last-child:nth-child(even) {
float: right;
}
.timeline .timeline-item:nth-child(even) .timeline-panel {
float: right;
left: 16px;
}
.timeline .timeline-item:nth-child(even) .timeline-panel:before {
border-left-width: 0;
border-right-width: 14px;
left: -14px;
right: auto;
}
.timeline-horizontal {
list-style: none;
position: relative;
padding: 20px 0px 20px 0px;
display: inline-block;
}
.timeline-horizontal:before {
height: 3px;
top: auto;
bottom: 26px;
left: 56px;
right: 0;
width: 100%;
margin-bottom: 20px;
}
.timeline-horizontal .timeline-item {
display: table-cell;
height: 280px;
width: 20%;
min-width: 320px;
float: none !important;
padding-left: 0px;
padding-right: 20px;
margin: 0 auto;
vertical-align: bottom;
}
.timeline-horizontal .timeline-item .timeline-panel {
top: auto;
bottom: 64px;
display: inline-block;
float: none !important;
left: 0 !important;
right: 0 !important;
width: 100%;
margin-bottom: 20px;
}
.timeline-horizontal .timeline-item .timeline-panel:before {
top: auto;
bottom: -16px;
left: 28px !important;
right: auto;
border-right: 16px solid transparent !important;
border-top: 16px solid #c0c0c0 !important;
border-bottom: 0 solid #c0c0c0 !important;
border-left: 16px solid transparent !important;
}
.timeline-horizontal .timeline-item:before,
.timeline-horizontal .timeline-item:after {
display: none;
}
.timeline-horizontal .timeline-item .timeline-badge {
top: auto;
bottom: 0px;
left: 43px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" rel="stylesheet" />
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="page-header">
<h1>Horizontal timeline</h1>
</div>
<div style="display:inline-block;width:100%;overflow-y:auto;">
<ul class="timeline timeline-horizontal">
<li class="timeline-item">
<div class="col-md-12 Timline-holder">
<div class="row">
<div class="col-md-6 col-sm-12 Timline-item">
<div class=" Timline-box" data-aos="fade-right">
<h3>One</h3>
</div>
<i class=" Timline-icon fa fa-2x fa-lightbulb-o"></i>
</div>
</div>
</div>
</li>
<li class="timeline-item">
<div class="col-md-12 Timline-holder">
<div class="row">
<div class="col-md-6 col-sm-12 Timline-item">
<div class=" Timline-box" data-aos="fade-right">
<h3>Two</h3>
</div>
<i class=" Timline-icon fa fa-2x fa-lightbulb-o"></i>
</div>
</div>
</div>
</li>
<li class="timeline-item">
<div class="col-md-12 Timline-holder">
<div class="row">
<div class="col-md-6 col-sm-12 Timline-item">
<div class=" Timline-box" data-aos="fade-right">
<h3>Three</h3>
</div>
<i class=" Timline-icon fa fa-2x fa-lightbulb-o"></i>
</div>
</div>
</div>
</li>
<li class="timeline-item">
<div class="col-md-12 Timline-holder">
<div class="row">
<div class="col-md-6 col-sm-12 Timline-item">
<div class=" Timline-box" data-aos="fade-right">
<h3>Four</h3>
</div>
<i class=" Timline-icon fa fa-2x fa-lightbulb-o"></i>
</div>
</div>
</div>
</li>
<li class="timeline-item">
<div class="col-md-12 Timline-holder">
<div class="row">
<div class="col-md-6 col-sm-12 Timline-item">
<div class=" Timline-box" data-aos="fade-right">
<h3>Five</h3>
</div>
<i class=" Timline-icon fa fa-2x fa-lightbulb-o"></i>
</div>
</div>
</div>
</li>
<li class="timeline-item">
<div class="col-md-12 Timline-holder">
<div class="row">
<div class="col-md-6 col-sm-12 Timline-item">
<div class=" Timline-box" data-aos="fade-right">
<h3>Six</h3>
</div>
<i class=" Timline-icon fa fa-2x fa-lightbulb-o"></i>
</div>
</div>
</div>
</li>
<li class="timeline-item">
<div class="col-md-12 Timline-holder">
<div class="row">
<div class="col-md-6 col-sm-12 Timline-item">
<div class=" Timline-box" data-aos="fade-right">
<h3>Seven
</h3>
</div>
<i class=" Timline-icon fa fa-2x fa-lightbulb-o"></i>
</div>
</div>
</div>
</li>
<li class="timeline-item">
<div class="col-md-12 Timline-holder">
<div class="row">
<div class="col-md-6 col-sm-12 Timline-item">
<div class=" Timline-box" data-aos="fade-right">
<h3>Eight</h3>
</div>
<i class=" Timline-icon fa fa-2x fa-lightbulb-o"></i>
</div>
</div>
</div>
</li>
<li class="timeline-item">
<div class="col-md-12 Timline-holder">
<div class="row">
<div class="col-md-6 col-sm-12 Timline-item">
<div class=" Timline-box" data-aos="fade-right">
<h3>Nine</h3>
</div>
<i class=" Timline-icon fa fa-2x fa-lightbulb-o"></i>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>

menu on hover - content shifts down & up

Trying to create a css menu:
<div style="" class="normal_height vc_row wpb_row vc_row-fluid shop_menu_row">
<div class="wpb_column vc_column_container vc_col-sm-12">
<div class="vc_column-inner ">
<div class="wpb_wrapper">
<div class="shop_menu_container">
<div class="category">
<button class="dropdown">
Face Makeup
</button>
</div>
<div class="category">
<button class="dropdown">
Eye Makeup
</button>
<div class="category-content">
Cake Eyeliner
T-shirts
</div>
</div>
<div class="category">
<button class="dropdown">
Lip Makeup
</button>
<div class="category-content">
Luminized Lips
Lip Pencil
</div>
</div>
<div class="category">
<button class="dropdown">
Accessories
</button>
<div class="category-content">
Eye Lashes
Palletes
</div>
</div>
<div class="category">
<button class="dropdown">
Brushes
</button>
<div class="category-content">
Synthetic‬‬ ‫‪Vegan‬‬ ‫‪Brushes‬‬
</div>
</div>
<div class="category">
<button class="dropdown">
Dermalogica
</button>
<div class="category-content">
Age Smart
Clear Start
Daily Defense
Powerbright
Skin Health
System Medibac Clearing
Ultracalming
</div>
</div>
</div>
<div class="wpb_text_column wpb_content_element ">
<div class="wpb_wrapper"></div>
</div>
</div>
</div>
</div>
</div>
With this css:
.shop_menu_row {
z-index: 1000;
}
.shop_content_row {
position: relative;
}
.shop_menu_container {
overflow: hidden;
background-color: #ffffff;
font-family: Arial;
width: 80%;
max-width: 80%;
display: flex;
justify-content: center;
margin: auto;
}
.shop_menu_container a {
float: left;
font-size: 16px;
color: black;
text-align: center;
padding: 14px 16px;
text-decoration: none;
text-transform: capitalize;
}
.category {
overflow: hidden;
/*margin: 0px auto;*/
margin: 0px 0px;
width: 12%;
display: inline-block;
text-align: center;
}
.category .dropdown {
font-size: 16px;
border: none;
outline: none;
color: white;
padding: 14px 16px;
background-color: inherit;
}
.shop_menu_container a:hover, .category:hover .dropdown {
background-color: red;
}
.category-content {
display: none;
position: relative;
background-color: #ffffff;
min-width: 160px;
z-index: 1;
text-align: center;
}
.category-content a {
float: none;
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: center;
}
.category-content a:hover {
background-color: red;
opacity: 1;
}
.category:hover .category-content {
display: block;
}
On hover category, entire content under (next div row) shifts down and up according to hover:
<div style="" class="normal_height vc_row wpb_row vc_row-fluid shop_content_row">
<div class="wpb_column vc_column_container vc_col-sm-3">
<div class="vc_column-inner ">
<div class="wpb_wrapper"></div>
</div>
</div>
<div class="wpb_column vc_column_container vc_col-sm-9">
<div class="vc_column-inner ">
<div class="wpb_wrapper">
<div class="wpb_single_image wpb_content_element vc_align_center">
<figure class="wpb_wrapper vc_figure">
<div class="vc_single_image-wrapper vc_box_shadow_border vc_box_border_grey">
<img width="960" height="640" src="https://website.com/wp-content/uploads/2017/08/brush-791306_960_720.jpg" class="vc_single_image-img attachment-full" alt="" srcset="https://website.com/wp-content/uploads/2017/08/brush-791306_960_720.jpg 960w, https://website.com/wp-content/uploads/2017/08/brush-791306_960_720-300x200.jpg 300w, https://website.com/wp-content/uploads/2017/08/brush-791306_960_720-768x512.jpg 768w" sizes="(max-width: 960px) 100vw, 960px">
</div>
</figure>
</div>
</div>
</div>
</div>
</div>
Tried fixing this with z-index and position for both but can't seem to get it to work...
Any ideas?
Thank you
Sorry for the long code
the rows are constructed with visual-composer
Instead of using position: relative; you should use position:absolute.
This way the position of the open-menu will not interfere with the rest of your page:
.category-content {
...
position: absolute;
...
}
Note that you have other positions problems there what I didn't fix, you might have them fixed in your original code, probably some css is missing here.
.shop_menu_row {
z-index: 1000;
}
.shop_content_row {
position: relative;
}
.shop_menu_container {
overflow: hidden;
background-color: #ffffff;
font-family: Arial;
width: 80%;
max-width: 80%;
display: flex;
justify-content: center;
margin: auto;
}
.shop_menu_container a {
float: left;
font-size: 16px;
color: black;
text-align: center;
padding: 14px 16px;
text-decoration: none;
text-transform: capitalize;
}
.category {
overflow: hidden;
/*margin: 0px auto;*/
margin: 0px 0px;
width: 12%;
display: inline-block;
text-align: center;
}
.category .dropdown {
font-size: 16px;
border: none;
outline: none;
color: white;
padding: 14px 16px;
background-color: inherit;
}
.shop_menu_container a:hover, .category:hover .dropdown {
background-color: red;
}
.category-content {
display: none;
position: absolute;
background-color: #ffffff;
min-width: 160px;
z-index: 1;
text-align: center;
}
.category-content a {
float: none;
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: center;
}
.category-content a:hover {
background-color: red;
opacity: 1;
}
.category:hover .category-content {
display: block;
}
<div style="" class="normal_height vc_row wpb_row vc_row-fluid shop_menu_row">
<div class="wpb_column vc_column_container vc_col-sm-12">
<div class="vc_column-inner ">
<div class="wpb_wrapper">
<div class="shop_menu_container">
<div class="category">
<button class="dropdown">
Face Makeup
</button>
</div>
<div class="category">
<button class="dropdown">
Eye Makeup
</button>
<div class="category-content">
Cake Eyeliner
T-shirts
</div>
</div>
<div class="category">
<button class="dropdown">
Lip Makeup
</button>
<div class="category-content">
Luminized Lips
Lip Pencil
</div>
</div>
<div class="category">
<button class="dropdown">
Accessories
</button>
<div class="category-content">
Eye Lashes
Palletes
</div>
</div>
<div class="category">
<button class="dropdown">
Brushes
</button>
<div class="category-content">
Synthetic‬‬ ‫‪Vegan‬‬ ‫‪Brushes‬‬
</div>
</div>
<div class="category">
<button class="dropdown">
Dermalogica
</button>
<div class="category-content">
Age Smart
Clear Start
Daily Defense
Powerbright
Skin Health
System Medibac Clearing
Ultracalming
</div>
</div>
</div>
<div class="wpb_text_column wpb_content_element ">
<div class="wpb_wrapper"></div>
</div>
</div>
</div>
</div>
</div>
<div>Content under menu</div>

Mulitiple span in single button - Span Positioning

I am trying to span positioning in button but cannot figur it out how to do it. Please help me out. Defferent button acting defferently.
I am using Bootstrap.
My expectation: enter image description here
But Showing:enter image description here
My Code
.button-row {
height: 200px;
width: 180px;
}
.button-radius {
border-bottom-right-radius: 2em;
-webkit-box-shadow: 0 8px 6px -6px black;
-moz-box-shadow: 0 8px 6px -6px black;
box-shadow: 0 8px 6px -6px black;
white-space:normal;
word-wrap: break-word;
}
.label-top-left{
position: relative;
left: -60px;
top: -90px;
display: inline-block;
padding:20px;
}
.label-top-right{
position: relative;
left: 60px;
top: 90px;
display: inline-block;
padding:20px;
}
.label-bottom-right{
position: relative;
right: -70px;
top: 36px;
display: inline-block;
}
.label-bottom-left{
position: relative;
left: -60px;
top: 90px;
display: inline-block;
}
.gi-2x{font-size: 2em;}
.gi-3x{font-size: 3em;}
.gi-4x{font-size: 4em;}
.gi-5x{font-size: 5em;}
<h3 class="text-warning">My Purchasing</h3>
<div class="row">
<div class="col-md-3 col-sm-6 col-xs-12 button-container">
<button type="button" onclick="location.href = 'Purchasing/PurchaseRequisitionRelease.aspx';" class="btn btn-default button-row button-radius">
Approve Purchase Requisition
<span runat="server" id="spnPR" class="label label-warning label-top-right">1 Pending</span>
<span class="glyphicon glyphicon-list-alt gi-2x text-warning label-top-left"></span>
</button>
</div>
<div class="col-md-3 col-sm-6 col-xs-12 button-container">
<button type="button" onclick="location.href = 'Purchasing/PurchaseOrderRelease.aspx';" class="btn btn-default button-row button-radius">
Approve Purchase Order
<span runat="server" id="SpnNoti" class="label label-warning label-bottom-left">2 Notification</span>
<span runat="server" id="spnPO" class="label label-warning label-top-right">5 Pending</span>
<span class="glyphicon glyphicon-send gi-2x text-warning label-top-left"></span>
</button>
</div>
<div class="col-md-3 col-sm-6 col-xs-12 button-container">
<button type="button" class="btn btn-default button-row button-radius" onclick="location.href = 'Purchasing/PurchaseHistory.aspx';">
Purchase History
<span class="glyphicon glyphicon-time gi-2x text-warning label-top-left"></span>
</button>
</div>
</div>
Try this will work...
.button-row {
height: 200px;
width: 180px;
}
.sec1,.sec2,.sec3{
height: 70px;
margin: 0 !important;
margin-top: 8px !important;
}
.button-radius {
border-bottom-right-radius: 2em;
-webkit-box-shadow: 0 8px 6px -6px black;
-moz-box-shadow: 0 8px 6px -6px black;
box-shadow: 0 8px 6px -6px black;
white-space:normal;
word-wrap: break-word;
}
.label-top-left{
position: relative;
left: -60px;
top: -90px;
display: inline-block;
padding:20px;
}
.label-top-right{
position: relative;
left: 60px;
top: 90px;
display: inline-block;
padding:20px;
}
.label-bottom-right{
position: relative;
right: -70px;
top: 36px;
display: inline-block;
}
.label-bottom-left{
position: relative;
left: -60px;
top: 90px;
display: inline-block;
}
.gi-2x{font-size: 2em;}
.gi-3x{font-size: 3em;}
.gi-4x{font-size: 4em;}
.gi-5x{font-size: 5em;}
<!-- 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">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
<h3 class="text-warning">My Purchasing</h3>
<div class="row">
<div class="col-md-3 col-sm-6 col-xs-12 button-container">
<a onclick="location.href = 'Purchasing/PurchaseOrderRelease.aspx';" class="btn btn-default button-row button-radius">
<div class="row sec1" >
<span class="glyphicon glyphicon-send gi-2x text-warning pull-left"></span>
<span runat="server" id="spnPO" class="label label-warning pull-right">5 Pending</span>
</div>
<div class="sec2">
Approve Purchase Order
</div>
<div class="row sec3">
<span runat="server" id="SpnNoti" class="label label-warning pull-left">2 Notification</span>
</div>
</a>
</div>
</div>

Making text appear next to icon

I want my "Navigation"text to appear just next to the icon, but I can't seem to be able to do it.
<nav class="nav-mobile">
<div class="navbar">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<div class="icon"><span class="icon-bar">
</span><span class="icon-bar">
</span><span class="icon-bar">
</span></div> <h3> Navigation</h3></a>
<div class="nav-collapse collapse" aria-expanded="false" style="height: 0px;">
</div></div></div></div>
</nav>
css
.icon-bar {
display: block;
width: 22px;
height: 2px;
border-radius: 1px;
background-color: #6c6d71;
}
nav .btn-navbar
{
display: block;
padding: 10px 15px;
border-top: solid 1px #d7d7d7;
border-bottom: solid 1px #d7d7d7;
}
https://jsfiddle.net/fLhrgw63/1/
Both H3 and the .icon div are block elements which will be 100% width by default. You need to change them to inline-block so that they are only as wide as the content within them.
.icon, h3 {
display:inline-block;
vertical-align:middle;
}
https://jsfiddle.net/fLhrgw63/3/
.icon and h3 are block elements. Making them inline-block should work:
CSS:
.icon {
display: inline-block;
width: 30px;
vertical-align: middle;
}
.nav-title {
display: inline-block;
}
HTML
<h3 class="nav-title">Navigation</h3>
.icon-bar {
display: block;
width: 22px;
height: 2px;
border-radius: 1px;
background-color: #6c6d71;
}
nav .btn-navbar {
display: block;
padding: 10px 15px;
border-top: solid 1px #d7d7d7;
border-bottom: solid 1px #d7d7d7;
}
.icon {
display: inline-block;
width: 30px;
vertical-align: middle;
}
.nav-title {
display: inline-block;
}
<nav class="nav-mobile">
<div class="navbar">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<div class="icon"><span class="icon-bar">
</span><span class="icon-bar">
</span><span class="icon-bar">
</span>
</div>
<h3 class="nav-title"> Navigation</h3>
</a>
<div class="nav-collapse collapse" aria-expanded="false" style="height: 0px;">
</div>
</div>
</div>
</div>
</nav>