Slide on Bootstrap 3 Carousel error - html

I'm working with a Bootstrap 3 carousel. Here is what I have done far, I want it to look similar to this.
Why does the slide preview from column 2 anytime I click the arrows? Is there a way to hide the preview from showing up when clicking next/previous
Anytime I click past two slides, it errors out and doesn't go back to the first slide.
<style type="text/css">
/* #information, #video {
width: 50%; //CSS styling for table tags.
} */
.linebreak {
display: none;
}
.image {
float: left!important;
}
.carousel slide {
width: 400px;
}
.text {
width: 45%!important;
float: right!important;
right: 14px!important;
/* top: 10px!important; */
margin-right: 35px!important;
/* margin-top: 20px!important; */
}
.carousel-inner {
overflow: visible;
}
.carousel img {
border-radius: 0px;
width: 140px;
margin-right: 10px;
margin-left: 80px;
}
.carousel-control active {
position: fixed;
}
.carousel {
margin-top: 40px;
}
.firstcolumn {
width: 1000px;
}
/*.video-container {
/*position:relative;
padding-bottom:315px;
padding-top:10px; /* width: 100% ;* max-width: 500px; padding-right:0px;
/*max-height:530px; overflow: auto;
border: none;
}
.video-container img {
position:absolute;
top:0;
left:0;
width:100%;
max-width: 500px;
max-height:530px;
height:100%;
margin: 0px;*/
/*}*/
</style>
<div class="firstcolumn">
<div class="row">
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6"> <!-- DIV 1 BEGIN -->
<div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="false">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
</ol>
<div class="carousel-inner">
<div class="item active">
<img class="image" src="https://www.evantage-technology.com/wp-content/uploads/2015/04/product_office365.jpg" alt="Los Angeles">
<div class="text">Office 365 is the brand name Microsoft uses for a group of subscriptions that provide productivity software and related services.</div>
</div>
<div class="item">
<img class="image" src="http://office365.ecolearning.eu/img/office_icos/delve-logo.png" alt="Chicago">
<div class="text">Microsoft Office Delve is a data visualization and discovery tool that incorporates elements of social networking and machine learning with the search capability of the Microsoft Office 365 suite.</div>
</div>
<!-- <div class="item">
<img src="ny.jpg" alt="New York">
</div>
</div> -->
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" data-slide="prev" style="margin-top: 50px">
<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next" style="margin-top: 50px">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div> <!-- DIV 1 END -->
<div class="secondcolumn">
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
<center><h3>WHAT DO YOU WANT TO DO?</h3></center>
<br/>
<div class="row">
<div class="col-sm-6" align="center">.col-sm-3</div>
<div class="col-sm-6" align="center">.col-sm-6</div>
</div>
<div class="row">
<div class="col-sm-6" align="center">.col-sm-3</div>
<div class="col-sm-6" align="center">.col-sm-6</div>
</div>
</div>
</div>
</div>
</div>

If you make use of the Bootstrap Grid inside your Carousel component you can avoid using any customized CSS. You just need to structure your HTML accordingly:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-md-6">
<div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="false">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
</ol>
<div class="carousel-inner">
<div class="item active">
<div class="row">
<div class="col-xs-4"><img class="img-responsive" src="https://www.evantage-technology.com/wp-content/uploads/2015/04/product_office365.jpg" alt="Los Angeles"></div>
<div class="col-xs-8">Office 365 is the brand name Microsoft uses for a group of subscriptions that provide productivity software and related services.</div>
</div>
</div>
<div class="item">
<div class="row">
<div class="col-xs-2"><img class="img-responsive" src="http://office365.ecolearning.eu/img/office_icos/delve-logo.png" alt="Chicago"></div>
<div class="col-xs-10">Microsoft Office Delve is a data visualization and discovery tool that incorporates elements of social networking and machine learning with the search capability of the Microsoft Office 365 suite.</div>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span><span class="sr-only">Previous</span></a>
<a class="right carousel-control" href="#myCarousel" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span><span class="sr-only">Next</span></a>
</div>
</div>
<div class="col-xs-12 col-md-6">
<h3 class="text-center">WHAT DO YOU WANT TO DO?</h3>
<div class="row">
<div class="col-sm-6 text-center">A</div>
<div class="col-sm-6 text-center">B</div>
</div>
<div class="row">
<div class="col-sm-6 text-center">C</div>
<div class="col-sm-6 text-center">D</div>
</div>
</div>
</div>
</div>
You may need to expand the snippet to view its responsive nature. I would also point out that you were using elements like <center> which were depreciated, or attributes like align="center" on your <div> elements. You should use CSS for this sort of positioning, which with respect to Bootstrap would involve applying the text-center class to the element whose contents you wish to be centered.

Related

Bootstrap - Carousel with images centered and auto-resized in width and height based on the Div container

I am trying to implement a carousel with Bootstrap, where the images are centered and auto-resized. For example, in the JSFiddle, as you can see the first image (the vertical one) stretches the whole div, while the third image remains at the top. I would like to reproduce the behavior of the Facebook or Twitter carousel, where the images are positioned in the center and resized according to the Div where they are included. Can you help me?
<div id="myCarousel" class="carousel slide">
<!-- Indicators -->
<ul class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active">One</li>
<li data-target="#myCarousel" data-slide-to="1">Two</li>
<li data-target="#myCarousel" data-slide-to="2">Three</li>
</ul>
<!-- Inner -->
<div class="carousel-inner">
<div class="item active">
<img src="https://scontent.ffco3-1.fna.fbcdn.net/v/t1.6435-9/171147625_1208393786271117_8898528403586821491_n.jpg?_nc_cat=111&ccb=1-3&_nc_sid=730e14&_nc_ohc=dDKFCCAYB-oAX_m2xtu&_nc_ht=scontent.ffco3-1.fna&oh=aa418a1e5facad55e6e4781237602778&oe=609A1892"
class="img-responsive" />
<div class="container">
<div class="carousel-caption">
<h1>Photo 1 - Vertical</h1>
<p>Hello!</p>
</div>
</div>
</div>
<div class="item">
<img src="https://scontent.ffco3-1.fna.fbcdn.net/v/t1.6435-9/173646266_1210629629380866_4626783539462302067_n.jpg?_nc_cat=111&ccb=1-3&_nc_sid=730e14&_nc_ohc=QelU_ZVtqAcAX9wHI-l&_nc_ht=scontent.ffco3-1.fna&oh=272c997f1febf514a031aefe9cb712cb&oe=609BBCA2"
class="img-responsive" />
<div class="container">
<div class="carousel-caption">
<h1>Photo 2 - Square</h1>
<p>Hello again!</p>
</div>
</div>
</div>
<div class="item">
<img src="https://scontent.ffco3-1.fna.fbcdn.net/v/t1.6435-9/167432599_1203101340133695_8518788973824059736_n.png?_nc_cat=107&ccb=1-3&_nc_sid=730e14&_nc_ohc=CItpIApuYmgAX_zHj8t&_nc_ht=scontent.ffco3-1.fna&oh=83145492bb38c8c2148df70086382459&oe=609A928F"
class="img-responsive" />
<div class="container">
<div class="carousel-caption">
<h1>Photo 3 - Horizontal</h1>
<p>Hello again and again!</p>
</div>
</div>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="icon-prev"></span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="icon-next"></span>
</a>
</div>
CSS
.carousel-indicators > li, .carousel-indicators > li.active {
width: 100px;
height: 25px;
border-radius: 0;
border: solid 1px grey;
background: lightgrey;
text-indent: 0;
}
.carousel-indicators > li.active {
background: white;
}
#myCarousel {
width: 500px;
height: 500px;
}
Add this
$('#myCarousel').owlCarousel({
autoHeight:true
});
Remove Height on CSS
#myCarousel {
width: 400px;
/*height: 400px;*/ /*remove This*/
}
Updated Code
#myCarousel .img-responsive{
margin:0 auto;
max-height:400px;
}
https://jsfiddle.net/lalji1051/qnrzuhm2/
Updeted :- https://jsfiddle.net/lalji1051/xmy46z3L/1/

Carousel indicators & control are not responding to mouse click

I have added two carousel slider on my webpage. main header carousel slider is working properly but second one having problems
a. it doesn't auto slide when website load. (but sometimes it does slide)
b. Indicators and Controls are not responding when clicked.
I already checked the following
a. Id, data-target and href
b. z-index
c. Libraries
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://unpkg.com/popper.js#1.15.0/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
**Check CodePen here: **
https://codepen.io/abdulrehman-siddiqi/pen/XWrMgqq
**Working Site: **
http://mirchisamosa.tk
This is a basic bootstrap carousel changed to include 4 images per slide... you will see that I made minor changes to get the multiple images to work...
Working snippet below:
.work-item.active {
display: flex;
margin-left: 0;
}
.carousel-item {
height: 150px;
}
.work-img {
display: inline-block;
max-width: 24% !important;
padding: 10px 10px;
}
.divContollers ul,
.divContollers a {
border: 2px solid red;
height: 40px;
top: 100%;
color: #000;
background: black;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<div class='container-fluid'>
<div class='row'>
<div id="demo" class="carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner">
<div class="carousel-item work-item active">
<img src="https://www.w3schools.com/bootstrap4/la.jpg" class='img-fluid' alt="Los Angeles" width="1100" height="500">
</div>
<div class="carousel-item work-item row ">
<div class="work-img col-4 col-sm-4 col-md-3 col-lg-3"><img src="https://picsum.photos/id/952/536/354.jpg" class="img-fluid " alt="img5"></div>
<div class="work-img col-4 col-sm-4 col-md-3 col-lg-3"><img src="https://picsum.photos/id/952/536/354.jpg" class="img-fluid " alt="img6"></div>
<div class="work-img col-4 col-sm-4 col-md-3 col-lg-3"><img src="https://picsum.photos/id/952/536/354.jpg" class="img-fluid " alt="img7"></div>
<div class="work-img col-4 col-sm-4 col-md-3 col-lg-3"><img src="https://picsum.photos/id/952/536/354.jpg" class="img-fluid " alt="img8"></div>
</div>
<div class="carousel-item work-item row ">
<div class="work-img col-sm-4 col-md-3 col-lg-3"><img src="https://picsum.photos/536/354.jpg" class="img-fluid" alt="img9"></div>
<div class="work-img col-sm-4 col-md-3 col-lg-3"><img src="https://picsum.photos/536/354.jpg" class="img-fluid" alt="img10"></div>
<div class="work-img col-sm-4 col-md-3 col-lg-3"><img src="https://picsum.photos/536/354.jpg" class="img-fluid" alt="img11"></div>
<div class="work-img col-sm-4 col-md-3 col-lg-3"><img src="https://picsum.photos/536/354.jpg" class="img-fluid" alt="img12"></div>
</div>
</div>
<div class='divContollers'>
<ul class="carousel-indicators">
<li data-target="#demo" data-slide-to="0" class="active"></li>
<li data-target="#demo" data-slide-to="1"></li>
<li data-target="#demo" data-slide-to="2"></li>
<!--
-->
</ul>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo" data-slide="prev">
<span class="carousel-control-prev-icon"></span>
</a>
<a class="carousel-control-next" href="#demo" data-slide="next">
<span class="carousel-control-next-icon"></span>
</a>
</div>
</div>
</div>
</div>

CSS Overlay on a circle image

I have a problem with CSS overlay. I'm making a website for a dog breeder and I want to make a carousel with male and female dogs. So my idea is to have 3 circular shaped images of male dogs on one slide of a carousel and 3 of female dogs on another. All of my images are 1000x1000 so they give a perfect circle on border-radius 50%.
On the overlay of the image there should be like 80% transparent background with dog's name and pedigree over the image. But my code does not work as it should so please help :)
Here's a part of my HTML for images:
<article>
<h2>Naši psi</h2>
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div class="item active kontejner">
<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
<img class="slika_psa" src="slika_pas.jpg"/>
<div class="info">
<h3>Sass Crveni Mayestoso</h3>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
<img class="slika_psa" src="slika_pas3.jpg"/>
</div>
<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
<img class="slika_psa" src="slika_pas2.jpg"/>
</div>
<h3 class="spol">Mužjaci</h3>
</div>
<div class="item kontejner">
<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
<img class="slika_psa" src="slika_pas.jpg"/>
</div>
<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
<img class="slika_psa" src="slika_pas3.jpg"/>
</div>
<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
<img class="slika_psa" src="slika_pas2.jpg"/>
</div>
<h3>Mužjaci</h3>
</div>
<br><br>
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
</ol>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
</div>
</article>
And part of CSS:
.kontejner {width: 90%;
margin: 25px auto;}
.slika_psa {
width: 80%;
border: 16px solid #fff;
border-radius: 50%;
background-color: #1c1c1c;
overflow: hidden;
}
.info {position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 100%;
width: 100%;
visibility: hidden;
transition: .5s ease;
background-color: #008CBA;
}
.slika_psa:hover .info {visibility: visible;}
.carousel-inner {height: 100%;}
article {display: table;
width: 100%;
height: 100vh;
margin-top: 50px;
background-image: url('background..jpg');}
I can't figure it out how to make perfect circular overlay...Any help appreciated.

Bootstrap carousel responsive img

I want to have the img in the carousel responsive. The height should be 100vh but the width needs to be as wide as it goes, depending on how big the img is. The overflowing part should be hidden. Now, when the screen gets smaller, the img is resized not to scale. Here's some screen shots
This is fine at full width, desktop version
This is about the witdh of tablets, but there are white space at the bottom which i dont want.
This is the phone version, resized but not to scale. It should also takes up the whole window, but the overflowing width can be hidden.
This is what I have for css:
.carousel,
.carousel-inner {
height: 100vh;
}
.carousel img {
position: absolute;
top: 0;
left: 0;
min-width: 100vw;
height: 100vh;
max-width: none;
}
<div class="carousel-inner" role="listbox">
<div class="item active">
<img class="img-responsive" src="photos/JO2_2978.JPG" alt="xmas_orchestra">
</div>
<div class="item">
<img src="photos/JO2_2875.JPG" alt="...">
</div>
<div class="item">
<img src="photos/IMG_1824.JPG" alt="...">
</div>
<div class="item">
<img src="photos/JO2_2955.JPG" alt="...">
</div>
<div class="item">
<img src="photos/IMG_3913.JPG" alt="...">
</div>
<div class="item">
<img src="photos/JO2_2957.JPG" alt="...">
</div>
</div> <!-- CAROUSEL-INNER -->
There is a better and a very simple way to do this.
Keep all your carousel code within the bootstrap column within a row(Grid system)
And give some class name like .carousel-column in my example and then do two things.
1.Set some height and width as per your wish in your custom css file.
2.And set img-responsive in your code in the mail HTML Page for carousel items.
It worked for me, hope it will work for all.
HTML CODE:
<!-- Carousel to highlight main services-->
<div class="row">
<div class="col-md-9 carousel-column">
<div id="myCarousel" class="carousel slide">
<!-- 1.Carousel Indicators-->
<ol class="carousel-indicators">
<li data-target="#myCarousel" class="active" data-
slideto="0</li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<!-- 2.carousel Items (Picture plus data)-->
<div class="carousel-inner">
<div class="item active">
<img src="images/book2.jpg" class="img-responsive img-cus" >
<div class="container">
<div class="carousel-caption">
<h1>Web Development</h1>
<h3>Let's begin development.It really is about who you are and what you can do</h3>
<p><a class="btn btn-primary btn-large" href="signup.html">Sign Up</a></p>
</div>
</div>
</div>
<div class="item">
<img src="images/book.jpg" class="img-responsive img-cus">
<div class="container">
<div class="carousel-caption">
<h1>Twitter Bootstrap</h1>
<h3>A HTML,CSS,Javascript library for responsive
mobile first web development</h3>
<p><a class="btn btn-primary btn-large"
href="signup.html">Sign Up</a></p>
</div>
</div>
</div>
<div class="item">
<img src="images/coffee.jpg" class="img-responsive img-cus"
>
<div class="container">
<div class="carousel-caption">
<h1>Java Tutorials</h1>
<h3>A powerful secure server side object oriented
programming language</h3>
<p><a class="btn btn-primary btn-large"
href="signup.html">Sign Up</a></p>
</div>
</div>
</div>
</div>
<!-- Now We will create the carousel controls-->
<a href="#myCarousel" class="left carousel-control" data-
slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a href="#myCarousel" class="right carousel-control" data-
slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
</div>
</div>
Now do this in CSS file
CSS Styling:
.carousel-column{
height:500px;
width:900px;
margin:0 auto;
}
Try this:
Check Demo here
HTML:
<div class="carousel slide" data-ride="carousel">
<div class="carousel-inner" role="listbox">
<div class="item active" style="background-image:url(http://dentistry.utah.edu/images/slider-banner/roy-hume.jpg); ">
</div>
<div class="item" style="background-image: url(http://dentistry.utah.edu/images/slider-banner/school-dentistry-students.jpg);">
</div>
</div>
<!-- CAROUSEL-INNER -->
</div>
CSS:
.carousel,
.carousel-inner {
height: 100vh;
}
.item {
border: 1px solid grey;
max-height: 100vh;
min-height: 100vh;
max-width: 100vw;
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
}
if you are using img src="...", then use class="img-responsive" and in css width="100%".
it worked like that
<div class="carousel-item activo">
<a href="#" style="display: block; width: 100%; height: 100%;">
<img class="img-fluid d-block w-100" src="01.jpg" alt="Alternate Text" />
</a>
</div>
Need to change img css that please check
.carousel,
.carousel-inner {
height: 100vh;
}
.carousel img {
position: absolute;
top: 0;
left: 0;
min-width: 100%;
height: auto;
max-width: 100%;
}
<div class="carousel-inner" role="listbox">
<div class="item active">
<img class="img-responsive" src="photos/JO2_2978.JPG" alt="xmas_orchestra">
</div>
<div class="item">
<img src="photos/JO2_2875.JPG" alt="...">
</div>
<div class="item">
<img src="photos/IMG_1824.JPG" alt="...">
</div>
<div class="item">
<img src="photos/JO2_2955.JPG" alt="...">
</div>
<div class="item">
<img src="photos/IMG_3913.JPG" alt="...">
</div>
<div class="item">
<img src="photos/JO2_2957.JPG" alt="...">
</div>
</div> <!-- CAROUSEL-INNER -->
.carousel img {
position: absolute;
top: 0;
left: 0;
min-width: 100vw;
height: 100vh;
max-width: none;
object-fit:cover;
object-position:center;
}
Please replace you CSS code.

Making 3 images sit next to eachother in bootstrap carousel and be centered

I'm trying to make a bootstrap carousel. However, I'm trying to make one of the slides consist of 3 images that sit next to each other wrapped in a div.
All the other slides in the show are centered and look nice enough, but the slide that consists of 3 img wrapped in a div just keeps floating to the left of the page even though I haven't told them to.
I will include code.
Carousel
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="images/jumbotron.jpg" alt="cd release promo">
</div>
<div class="item">
<img src="images/Coldclock Knockout Local 662 (10).jpg" alt="Robby and Ryan in blue">
</div>
<!-- Div containing 3 images -->
<div id="ryanSlide" class="item">
<div id="ryanSlideContainer">
<img src="images/Coldclock Knockout Local 662 (38).jpg" alt="Ryan 1">
<img src="images/Coldclock Knockout Local 662 (46).jpg" alt="Ryan 2 B&W">
<img src="images/Coldclock Knockout Local 662 (47).jpg" alt="Ryan 3">
</div>
</div>
<div class="item">
<img src="images/Coldclock Knockout Local 662 (48).jpg" alt="Crowd Shot">
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
CSS + bootstrap is also being used on this page
body {
background-color: black;
}
/*================================================================================================
NAVIGATION
================================================================================================*/
.active {
border-bottom: 1px solid red;
}
.navbar-inverse .navbar-nav > .active > a{
font-size: 1.25em;
}
#navigation {
margin-bottom: 0px;
border-radius: 0px;
}
/*================================================================================================
JUMBOTRON
================================================================================================*/
#myCarousel img {
height: 500px;
margin: 0 auto;
}
#ryanSlide {
margin: 0 auto;
width: 100%;
}
#ryanSlideContainer {
margin: 0 auto;
}
#ryanSlide img {
margin: 0 auto;
}
/*================================================================================================
================================================================================================*/
I'm not using any custom javascript.
I just cant seem to figure out how to get the one slide to center itself like the others.
You can technically put anything in a carousel, it doesn't need to just be a single image, so you could just use bootstrap columns to do it.
For example:
<div id="ryanSlide" class="item">
<div class="col-md-4">
<img src="" class="img-responsive center-block" alt=""/>
</div>
<div class="col-md-4">
<img src="" class="img-responsive center-block" alt=""/>
</div>
<div class="col-md-4">
<img src="" class="img-responsive center-block" alt=""/>
</div>
</div>