I am using bootstrap media slider carousel. but, it is repeating items if items are less than 4. I want to slide one item per click.
see my code below
JQUERY
$(document).ready(function(){
$('#media').carousel({
pause: true,
interval: false
});
$('.carousel .item').each(function(){
var next = $(this).next();
if (!next.length) {
next = $(this).siblings(':first');
}
next.children(':first-child').clone().appendTo($(this));
for (var i=0;i<2;i++) {
next=next.next();
if (!next.length) {
next = $(this).siblings(':first');
}
next.children(':first-child').clone().appendTo($(this));
}
});
});
Already tried to change [for (var i=0;i<2;i++) {] i<4 and i<6 instead of i<2
CSS :
/* carousel */
.carousel-pack{height:40px; margin:0; padding:0;}
.carousel-pack-inner{width:252px; margin: 0 auto;}
.media-carousel
{
margin-bottom: 0;
margin-top: 20px;
}
.carousel-control{line-height: 24px;}
/* Previous button */
.media-carousel .carousel-control.left
{
left: -37px;
background-image: none;
background: none repeat scroll 0 0 #222222;
border: 2px solid #FFFFFF;
height: 32px;
width: 32px;
margin-top: 4px;
}
/* Next button */
.media-carousel .carousel-control.right
{
right: -37px;
background-image: none;
background: none repeat scroll 0 0 #222222;
border: 2px solid #FFFFFF;
height: 32px;
width: 32px;
margin-top: 4px;
}
/* Changes the position of the indicators */
.media-carousel .carousel-indicators
{
right: 50%;
top: auto;
bottom: 0px;
margin-right: -19px;
}
/* Changes the colour of the indicators */
.media-carousel .carousel-indicators li
{
background: #c0c0c0;
}
.media-carousel .carousel-indicators .active
{
background: #333333;
}
.thumbnail
{
width: 48px !important;
height: 40px!important;
border-radius:0;
border-radius: 8px !important;
}
.thumbs{
margin-right: 15px;
padding: 0;
float: left;
}
.thumbs:first-child{margin-left: 7px;}
.thumbs:last-child{margin-right: 7px;}
HTML
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div class="carousel-pack">
<div class="carousel-pack-inner">
<div class="carousel slide media-carousel" id="media">
<div class="carousel-inner">
<div class="item active">
<div class="row-new">
<div class="thumbs">
<a class="thumbnail" href="#">1</a>
</div>
</div>
</div>
<div class="item">
<div class="row-new">
<div class="thumbs">
<a class="thumbnail" href="#">2</a>
</div>
</div>
</div>
</div>
<a data-slide="prev" href="#media" class="left carousel-control">‹</a>
<a data-slide="next" href="#media" class="right carousel-control">›</a>
</div>
</div>
</div>
see it repeating 2. I have only two items 1 and 2. how can I stop repeating items?
Solved this by Splitting an array into chunks using array_chunk() and foreach.
HTML
<div class="carousel-pack">
<div class="carousel-pack-inner">
<div class="carousel slide media-carousel" data-ride="carousel" data-wrap="true" id="media">
<div class="carousel-inner">
<?php
$active = 'active';
$pages = array_chunk($file_array,3);
foreach ($pages as $key => $data) { ?>
<div class="item <?php echo $active; ?>">
<?php foreach ($data as $key => $value) { ?>
<div class="row-new">
<div class="thumbs">
<a class="thumbnail" href="#" target="_blank"><?php echo $value; ?></a>
</div>
</div>
<?php } ?>
</div>
<?php $active='';
} ?>
</div>
<a data-slide="prev" href="#media" class="left carousel-control">‹</a>
<a data-slide="next" href="#media" class="right carousel-control">›</a>
</div>
JQUERY
$(document).ready(function(){
$('#media').carousel({
pause: true,
interval: false
});
});
Related
I am trying to edit the content on standard notification. I want to split the body into two equal columns. When I try doing that in the HTML it always mess the CSS and automatically re-write it.
I am adding the following:
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {
box-sizing: border-box;
}
.column-left {
float: left;
width: 50%;
padding: 10px;
height: 300px;
}
.column-right {
float: right;
width: 50%;
padding: 10px;
height: 300px;
}
.row:after {
content: "";
display: table;
clear: both;
}
</style>
</head>
<body>
<h2>Two Equal Columns</h2>
<div class="row">
<div class="column-left" style="background-color:#aaa;">
<h2>Column 1</h2>
<p>text</p>
</div>
<div class="column-right" style="background-color:#bbb;">
<h2>Column 2</h2>
<p>text</p>
</div>
</div>
</body>
But as soon I hit "ok" it re-write it to this:
<html>
<head>
<style type="text/css">.c0 { font-family: 'Arial' } .c1 { margin: 0px 0px 14px; font-size: 18px; font-weight: bold } .c2 { padding: 10px; background-color: #aaaaaa } .c3 { margin: 0px 0px 13px } .c4 { padding: 10px; background-color: #bbbbbb } </style>
</head>
<body class="c0">
<div class="c1">Two Equal Columns</div>
<div>
<div class="c2">
<div class="c1">Column 1</div>
<p class="c3">text</p>
</div>
<div class="c4">
<div class="c1">Column 2</div>
<p class="c3">text </p>
</div>
</div>
</body>
</html>
Unfortunately, Archer pretty much "dumbs" down the HTML formatting permitted in notifications. The best you can get away with is using tables instead of CSS to do columns.
Since you want equal columns with any content, you can Choose the 'Body Layout' in the Notification as 'Two Column 50-50'.
That way, you can add any dynamic content within the two columns.
You can use css grid
Css Grid is good documentation
.row {
display: grid;
grid-template-columns: 1fr 1fr;
column-gap: 10px;
}
<div class="row">
<div class="column-left" style="background-color:#aaa;">
<h2>Column 1</h2>
<p>text</p>
</div>
<div class="column-right" style="background-color:#bbb;">
<h2>Column 2</h2>
<p>text</p>
</div>
</div>
I'm using this updated Bootstrap sidebar collapse in my page, but here the sidebar & content have a fixed width for both divs, the main content is not taking full width after it has collapsed.
HTML:
<div class="col-md-3 col-xs-1 p-l-0 p-r-0 collapse in" id="sidebar">...</div>
<main class="col-md-9 col-xs-11 p-l-2 p-t-2">...</main>
But what I want is after the sidebar collapsed, main content should take full width.
I checked this and few other questions from stack overflow but didn't find what I want
Here's what needed to be done:
First I replaced the outdated col-xs with col. Then I replaced the remaining col-md-9 col-11 with col. Done!
The reason why it's working is because the first column for the sidebar is defined already. col then just fills out all of the available remaining space.
Here's the working code:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
#sidebar .list-group-item {
border-radius: 0;
background-color: #333;
color: #ccc;
border-left: 0;
border-right: 0;
border-color: #2c2c2c;
white-space: nowrap;
}
/* highlight active menu */
#sidebar .list-group-item:not(.collapsed) {
background-color: #222;
}
/* closed state */
#sidebar .list-group .list-group-item[aria-expanded="false"]::after {
content: " \f0d7";
font-family: FontAwesome;
display: inline;
text-align: right;
padding-left: 5px;
}
/* open state */
#sidebar .list-group .list-group-item[aria-expanded="true"] {
background-color: #222;
}
#sidebar .list-group .list-group-item[aria-expanded="true"]::after {
content: " \f0da";
font-family: FontAwesome;
display: inline;
text-align: right;
padding-left: 5px;
}
/* level 1*/
#sidebar .list-group .collapse .list-group-item {
padding-left: 20px;
}
/* level 2*/
#sidebar .list-group .collapse > .collapse .list-group-item {
padding-left: 30px;
}
/* level 3*/
#sidebar .list-group .collapse > .collapse > .collapse .list-group-item {
padding-left: 40px;
}
#media (max-width:48em) {
/* overlay sub levels on small screens */
#sidebar .list-group .collapse.in, #sidebar .list-group .collapsing {
position: absolute;
z-index: 1;
width: 190px;
}
#sidebar .list-group > .list-group-item {
text-align: center;
padding: .75rem .5rem;
}
/* hide caret icons of top level when collapsed */
#sidebar .list-group > .list-group-item[aria-expanded="true"]::after,
#sidebar .list-group > .list-group-item[aria-expanded="false"]::after {
display:none;
}
}
/* change transition animation to width when entire sidebar is toggled */
#sidebar.collapse {
-webkit-transition-timing-function: ease;
-o-transition-timing-function: ease;
transition-timing-function: ease;
-webkit-transition-duration: .2s;
-o-transition-duration: .2s;
transition-duration: .2s;
}
#sidebar.collapsing {
opacity: 0.8;
width: 0;
-webkit-transition-timing-function: ease-in;
-o-transition-timing-function: ease-in;
transition-timing-function: ease-in;
-webkit-transition-property: width;
-o-transition-property: width;
transition-property: width;
}
main{
background-color:green;
}
</style>
<div class="container-fluid">
<div class="row">
<div class="col-md-3 col-1 pl-0 pr-0 collapse in" id="sidebar">
<div class="list-group panel">
<i class="fa fa-dashboard"></i> <span class="hidden-sm-down">Item 1</span>
<div class="collapse" id="menu1">
Subitem 1
<div class="collapse" id="menu1sub1">
Subitem 1 a
Subitem 2 b
Subitem 3 c
<div class="collapse" id="menu1sub1sub1">
Subitem 3 c.1
Subitem 3 c.2
</div>
Subitem 4 d
Subitem 5 e
<div class="collapse" id="menu1sub1sub2">
Subitem 5 e.1
Subitem 5 e.2
</div>
</div>
Subitem 2
Subitem 3
</div>
<i class="fa fa-film"></i> <span class="hidden-sm-down">Item 2</span>
<i class="fa fa-book"></i> <span class="hidden-sm-down">Item 3 </span>
<div class="collapse" id="menu3">
3.1
3.2
<div class="collapse" id="menu3sub2">
3.2 a
3.2 b
3.2 c
</div>
3.3
</div>
<i class="fa fa-heart"></i> <span class="hidden-sm-down">Item 4</span>
<i class="fa fa-list"></i> <span class="hidden-sm-down">Item 5</span>
<i class="fa fa-clock-o"></i> <span class="hidden-sm-down">Link</span>
<i class="fa fa-th"></i> <span class="hidden-sm-down">Link</span>
<i class="fa fa-gear"></i> <span class="hidden-sm-down">Link</span>
<i class="fa fa-calendar"></i> <span class="hidden-sm-down">Link</span>
<i class="fa fa-envelope"></i> <span class="hidden-sm-down">Link</span>
<i class="fa fa-bar-chart-o"></i> <span class="hidden-sm-down">Link</span>
<i class="fa fa-star"></i> <span class="hidden-sm-down">Link</span>
</div>
</div>
<main class="col pl-2 pt-2">
<i class="fa fa-navicon fa-lg"></i>
<hr>
<div class="page-header">
<h1>Bootstrap 4 Sidebar Menu</h1>
</div>
<p class="lead">A responsive, multi-level vertical accordion.</p>
</main>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
enter image description hereI'm trying to have an information panel with three different columns using bootstrap 3. I've nested the columns properly, I think, but the panels are hidden beneath the main row and I can't find a way to reveal it.
it's showing that the container is there, but you can't see it
<div class="row creative_line">
<div class="col-md-12">
<h2 class="text-center">Smart & Creative<br><p>This is why you will use it</p></h2>
</div>
<div class="col-md-12">
<div class="row">
<div class="col-md-4 multi">
<div class="img-circle">
</div>
</div>
<div class="col-md-4 ui">
<div class="img-circle">
</div>
</div>
<div class="col-md-4 design">
<div class="img-circle">
</div>
</div>
</div>
</div>
</div>
This is my current css
.creative_line {
background: yellow;
min-height: 300px;
color: $primary-color;
font-family: $font-stack;
}
.creative_line p {
color: $primary-color;
font-family: $font-stack2;
font-size: 35%;
margin-top: 10px;
}
h2 {
font-size: 40px;
}
.img-circle {
-webkit-clip-path: circle(50% at 50% 50%);
clip-path: circle(50% at 50% 50%);
background: red;
}
.multi,
.ui,
.design {
min-height: 300px;
color: blue;
z-index: 1;
}
I am trying to get the TreeView from BootSnipp here: 1 to work with Bootstrap 3 tabs.
It works as expected initially, but breaks down after a few clicks, then responding/not responding arbitrarily. Here's the html+js+css I am working with:
// ***************** BEGIN TREE JS *****************
$.fn.extend({
treed: function() {
return this.each(function() {
//initialize each of the top levels
var tree = $(this);
tree.addClass("tree");
tree.find('li').has("ul").each(function() {
var branch = $(this); //li with children ul
branch.prepend("<i class='indicator glyphicon glyphicon-plus-sign'></i>");
branch.addClass('branch');
branch.on('click', function(e) {
if (this == e.target) {
var icon = $(this).children('i:first');
icon.toggleClass("glyphicon-minus-sign glyphicon-plus-sign");
$(this).children().children().toggle();
}
})
branch.children().children().toggle();
});
//fire event from the dynamically added icon
$('.branch .indicator').on('click', function() {
$(this).closest('li').click();
});
//fire event to open branch if the li contains an anchor instead of text
$('.branch a').on('click', function(e) {
$(this).closest('li').click();
e.preventDefault();
});
//fire event to open branch if the li contains a button instead of text
$('.branch button').on('click', function(e) {
$(this).closest('li').click();
e.preventDefault();
});
});
}
});
$('.tree').treed();
//***************** END TREE JS *****************
/*BEGIN TREE CSS*/
.tree,
.tree ul {
margin: 0;
padding: 0;
list-style: none
}
.tree ul {
margin-left: 1em;
position: relative
}
.tree ul ul {
margin-left: .5em
}
.tree ul:before {
content: "";
display: block;
width: 0;
position: absolute;
top: 0;
bottom: 0;
left: 0;
border-left: 1px solid
}
.tree li {
margin: 0;
padding: 0 1em;
line-height: 2em;
color: #369;
font-weight: 700;
position: relative
}
.tree ul li:before {
content: "";
display: block;
width: 10px;
height: 0;
border-top: 1px solid;
margin-top: -1px;
position: absolute;
top: 1em;
left: 0
}
.tree ul li:last-child:before {
background: #fff;
height: auto;
top: 1em;
bottom: 0
}
.indicator {
margin-right: 5px;
}
.tree li a {
text-decoration: none;
color: #369;
}
.tree li button,
.tree li button:active,
.tree li button:focus {
text-decoration: none;
color: #369;
border: none;
background: transparent;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
outline: 0;
}
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<div class="container">
<div class="row">
<div class="col-xs-7">
<ul id="tabs" class="tree">
<li>Continent Overview
</li>
<li>Countries
<ul>
<li>Country 1
<ul>
<li>Country Overview
</li>
</ul>
</li>
<li>Country 2
<ul>
<li>Country Overview
</li>
<li>Cities
<ul>
<li>City P
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>Cities
<ul>
<li>
City A
<ul>
<li>Overview
</li>
</ul>
</li>
<li>
City B
<ul>
<li>Overview
<li>Neighborhoods
<ul>
<li>Neighborhood X
</li>
</ul>
</li>
</li>
</ul>
</li>
</ul>
</li>
<li>Neighborhoods
<ul>
<li>Neighborhood T
</li>
</ul>
</li>
</ul>
</div>
<div class="col-xs-5">
<div class="tabbable" id="tabbable-proj">
<div class="tab-content main-tab-content">
<div class="tab-pane fade in active" id="panel-continent-overview">
<strong>Continent Details</strong>
</div>
<div class="tab-pane fade" id="panel-country-9400470e-fa49-46ea-b587-2ceb108600c0">
<strong>Country Details</strong>
</div>
<div class="tab-pane fade" id="panel-country-45f97844-9773-4059-bafd-a2782fc06db1">
<strong>Country Details</strong>
</div>
<div class="tab-pane fade" id="panel-city-2120d7aa-2b93-4d0d-a42b-8c6fedc9333a">
<strong>City Details</strong>
</div>
<div class="tab-pane fade" id="panel-neighborhood-babea547-cfb6-4e12-8c4a-bbbb25068d8a">
<strong>Neighborhood Details</strong>
</div>
<div class="tab-pane fade" id="panel-city-b4a991ce-80ef-4406-b1d2-9892c0d93d18">
<strong>City Details</strong>
</div>
<div class="tab-pane fade" id="panel-city-2e6f1227-66d0-4061-9243-bf6cf4feaabd">
<strong>City Details</strong>
</div>
<div class="tab-pane fade" id="panel-neighborhood-f3fd5e2f-583d-4ccb-b163-03e118896f71">
<strong>Neighborhood Details</strong>
</div>
<div class="tab-pane fade" id="panel-neighborhood-319d56ac-286f-4afa-af42-5ec74bbcac19">
<strong>Neighborhood Details</strong>
</div>
</div>
</div>
</div>
</div>
</div>
I am totally at a loss as to what is causing the problem. Could someone please help me with flushing out the bug?
Okay, I will attempt it myself.
It was not working because Bootstrap expects the tabs to be one flat ul - and I had multiple nested uls.
I got it working by
dissociating the tree from the tabbable;
creating a hidden flat ul for tabs; and
hooking the relevant tree anchor clicks to manually call $('...).tab('show') on the respective tab.
I have also discovered that using this strategy, I can call up my tabs from anywhere on the page - e.g. from a breadcrumb or a random anchor.
Now I know my question was too noobish for most people out there to tackle - the html itself was all over the place.
The answer I have been able to work out looks slightly hackish. Will somebody at least comment as to how good or bad it is? Like, will it incur search engine penalties for hiding the ul? What will the implications for accessibility be - especially as I have removed text from the anchor tags?
Or should I post one or more new questions to solicit this kind of feedback?
Cheers
// ***************** BEGIN TREE JS *****************
$.fn.extend({
treed: function() {
return this.each(function() {
//initialize each of the top levels
var tree = $(this);
tree.addClass("tree");
tree.find('li').has("ul").each(function() {
var branch = $(this); //li with children ul
branch.prepend("<i class='indicator glyphicon glyphicon-plus-sign'></i>");
branch.addClass('branch');
branch.on('click', function(e) {
if (this == e.target) {
var icon = $(this).children('i:first');
icon.toggleClass("glyphicon-minus-sign glyphicon-plus-sign");
$(this).children().children().toggle();
}
})
branch.children().children().toggle();
});
//fire event from the dynamically added icon
$('.branch .indicator').on('click', function() {
$(this).closest('li').click();
});
//fire event to open branch if the li contains an anchor instead of text
$('.branch a').on('click', function(e) {
$(this).closest('li').click();
e.preventDefault();
});
//fire event to open branch if the li contains a button instead of text
$('.branch button').on('click', function(e) {
$(this).closest('li').click();
e.preventDefault();
});
});
}
});
$('.tree').treed();
//***************** END TREE JS *****************
$(document).ready(function() {
$("a.tree-link").on('click', function (event) {
var hrefTab = $(this).attr('href');
$('#hidden-tabs a[href='+hrefTab+']').tab('show');
});
});
#hidden-tabs{
height: 0px;
list-style-type: none;
padding:0;
margin:0;
}
#hidden-tabs{
height: 0px;
list-style-type: none;
padding:0;
margin:0;
}
#hidden-tabs li{
height: 0px;
padding:0;
margin:0;
}
#hidden-tabs li a{
height: 0px;
padding:0;
margin:0;
}
/*BEGIN TREE CSS*/
.tree,
.tree ul {
margin: 0;
padding: 0;
list-style: none
}
.tree ul {
margin-left: 1em;
position: relative
}
.tree ul ul {
margin-left: .5em
}
.tree ul:before {
content: "";
display: block;
width: 0;
position: absolute;
top: 0;
bottom: 0;
left: 0;
border-left: 1px solid
}
.tree li {
margin: 0;
padding: 0 1em;
line-height: 2em;
color: #369;
font-weight: 700;
position: relative
}
.tree ul li:before {
content: "";
display: block;
width: 10px;
height: 0;
border-top: 1px solid;
margin-top: -1px;
position: absolute;
top: 1em;
left: 0
}
.tree ul li:last-child:before {
background: #fff;
height: auto;
top: 1em;
bottom: 0
}
.indicator {
margin-right: 5px;
}
.tree li a {
text-decoration: none;
color: #369;
}
.tree li button,
.tree li button:active,
.tree li button:focus {
text-decoration: none;
color: #369;
border: none;
background: transparent;
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
outline: 0;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet" />
<div class="container">
<div class="row">
<div class="col-xs-7">
<ul class="tree">
<li>Continent Overview
</li>
<li>Countries
<ul>
<li>Country 1
<ul>
<li>Country Overview
</li>
</ul>
</li>
<li>Country 2
<ul>
<li>Country Overview
</li>
<li>Cities
<ul>
<li>City P
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>Cities
<ul>
<li>
City A
<ul>
<li>Overview
</li>
</ul>
</li>
<li>
City B
<ul>
<li>Overview
<li>Neighborhoods
<ul>
<li>Neighborhood X
</li>
</ul>
</li>
</li>
</ul>
</li>
</ul>
</li>
<li>Neighborhoods
<ul>
<li>Neighborhood T
</li>
</ul>
</li>
</ul>
</div>
<div class="col-xs-5">
<div class="tabbable" id="tabbable-proj">
<ul id="hidden-tabs" role="tablist" aria-expanded="false">
<li>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
<li>
</li>
</ul>
<div class="tab-content main-tab-content">
<div class="tab-pane fade in active" id="panel-continent-overview">
<strong>Continent Details</strong>
</div>
<div class="tab-pane fade" id="panel-country-9400470e-fa49-46ea-b587-2ceb108600c0">
<strong>Country 1 Details</strong>
</div>
<div class="tab-pane fade" id="panel-country-45f97844-9773-4059-bafd-a2782fc06db1">
<strong>Country 2 Details</strong>
</div>
<div class="tab-pane fade" id="panel-city-2120d7aa-2b93-4d0d-a42b-8c6fedc9333a">
<strong>City P Details</strong>
</div>
<div class="tab-pane fade" id="panel-neighborhood-babea547-cfb6-4e12-8c4a-bbbb25068d8a">
<strong>Neighborhood Details</strong>
</div>
<div class="tab-pane fade" id="panel-city-b4a991ce-80ef-4406-b1d2-9892c0d93d18">
<strong>City A Details</strong>
</div>
<div class="tab-pane fade" id="panel-city-2e6f1227-66d0-4061-9243-bf6cf4feaabd">
<strong>City B Details</strong>
</div>
<div class="tab-pane fade" id="panel-neighborhood-f3fd5e2f-583d-4ccb-b163-03e118896f71">
<strong>Neighborhood X Details</strong>
</div>
<div class="tab-pane fade" id="panel-neighborhood-319d56ac-286f-4afa-af42-5ec74bbcac19">
<strong>Neighborhood T Details</strong>
</div>
</div>
</div>
</div>
</div>
</div>
I followed this http://codepen.io/redfrost/pen/dbrgk codepen working gallery snippet to the tee . Everything works as far as functionality but there is a background coming from a bootstrap class that makes the gallery wider than expected. The arrows according to the snippet should be contained within the image div itself.
I have deleted both style sheets just to see if the background would go away and it did not. It is a bootstrap class issue.
Here is the image of the issue http://postimg.org/image/mmdbsl6sp/full/
I think the class causing the issue is class="carousel-inner"
Here is the markup I have for the gallery:
#extends('layouts.main')
#section('content')
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<div class="carousel slide" id="myCarousel">
<div class="carousel-inner">
<div class="item active">
<div class="bannerImage">
<img src="http://placehold.it/960x405" alt="">
</div>
<div class="caption row-fluid">
<div class="span4"><h3>Picture 1</h3>
</div>
<div class="span8"><p>Picture 1 details</p>
</div>
</div>
</div><!-- /Slide1 -->
<div class="item">
<div class="bannerImage">
<img src="http://placehold.it/960x405" alt="">
</div>
<div class="caption row-fluid">
<div class="span4"><h3>Picture 2</h3>
</div>
<div class="span8"><p>Picture 2 details</p>
</div>
</div>
</div><!-- /Slide2 -->
<div class="item">
<div class="bannerImage">
<img src="http://placehold.it/960x405" alt="">
</div>
<div class="caption row-fluid">
<div class="span4"><h3>Picture 3</h3>
</div>
<div class="span8"><p>Picture 3 details</p>
</div>
</div>
</div><!-- /Slide2 -->
</div>
<div class="control-box">
<a data-slide="prev" href="#myCarousel" class="carousel-control left">‹</a>
<a data-slide="next" href="#myCarousel" class="carousel-control right">›</a>
</div><!-- /.control-box -->
</div><!-- /#myCarousel -->
</div><!-- /.span12 -->
</div><!-- /.row -->
</div><!-- /.container -->
#stop
Here is the css:
div { word-break: break-all; }
img {
max-width:100%;
display: block;
margin-left: auto;
margin-right: auto;
}
a {
-webkit-transition: all 150ms ease;
-moz-transition: all 150ms ease;
-ms-transition: all 150ms ease;
-o-transition: all 150ms ease;
transition: all 150ms ease;
}
a:hover {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; /* IE 8 */
filter: alpha(opacity=50); /* IE7 */
text-decoration: none;
}
/* Container */
/* Page Header */
.page-header {
background: #fbf4e0;
margin: -30px 0px 0px;
padding: 20px 40px;
border-top: 4px solid #ccc;
color: #a83b3b;
text-transform: uppercase;
}
.page-header h3 {
line-height: 0.88rem;
color: #a83b3b;
}
/* Thumbnail Box */
.caption {
height: 140px;
width: 100%;
margin: 20px 0px;
padding: 20px;
box-sizing:border-box;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
}
.caption .span4, .caption .span8 {
padding: 0px 20px;
}
.caption .span4 {
border-right: 1px dotted #CCCCCC;
}
.caption h3 {
color: #a83b3b;
line-height: 2rem;
margin: 0 0 20px;
text-transform: uppercase;
}
.caption p {
font-size: 1rem;
line-height: 1.6rem;
color: #a83b3b;
}
.btn.btn-mini {
background: #a83b3b;
border-radius: 0 0 0 0;
color: #fbf4e0;
font-size: 0.63rem;
text-shadow: none !important;
}
.carousel-control {
top: 33%;
zoom: 7;
color: #ff3333;
}
/* Footer */
.footer {
margin: auto;
width: 100%;
max-width: 960px;
display: block;
font-size: 0.69rem;
}
.footer, .footer a {
color: #fff;
}
p.right {
float: right;
}
body:after{content:"less than 320px";font-size:1rem;font-weight:bold;position:fixed;bottom:0;width:100%;text-align:center;background-color:hsla(1,60%,40%,0.7);color:#fff;height:20px;padding-top:0;margin-left:0;left:0}#media only screen and (min-width:320px){body:after{content:"320 to 480px";background-color:hsla(90,60%,40%,0.7);height:20px;padding-top:0;margin-left:0}}#media only screen and (min-width:480px){body:after{content:"480 to 768px";background-color:hsla(180,60%,40%,0.7);height:20px;padding-top:0;margin-left:0}}#media only screen and (min-width:768px){body:after{content:"768 to 980px";background-color:hsla(270,60%,40%,0.7);height:20px;padding-top:0;margin-left:0}}#media only screen and (min-width:980px){body:after{content:"980 to 1024px";background-color:hsla(300,60%,40%,0.7);height:20px;padding-top:0;margin-left:0}}#media only screen and (min-width:1024px){body:after{content:"1024 and up";background-color:hsla(360,60%,40%,0.7);height:20px;padding-top:0;margin-left:0}}
::selection { background: #ff5e99; color: #FFFFFF; text-shadow: 0; }
::-moz-selection { background: #ff5e99; color: #FFFFFF; }
a, a:focus, a:active, a:hover, object, embed { outline: none; }
:-moz-any-link:focus { outline: none; }
input::-moz-focus-inner { border: 0; }