Image slider with twitter bootstrap responsive layout - html

I've created my site to have a twitter bootstrap responsive layout but i just added a image slider and cant seem to be able to get it shrink to when you narrow the screen like the rest of my site i have tried to wrap it in tag but it does not have any effect can anyone help me out with this? Thanks in advance!
Here's my Image Slider HTML code:
<div class="container">
<div class="span12">
<div id = "Myhero">
<div id = "pager"></div>
<div class = "glyphicon glyphicon-pause" id = "pause"></div>
<div class = "glyphicon glyphicon-play" id = "play"></div>
<div class = "glyphicon glyphicon-chevron-right" id = "next"></div>
<div class = "glyphicon glyphicon-chevron-left" id = "prev"></div>
<div id = "Myslider">
<div class = "MyMyitems">
<img src = "b1.png"></img>
<div class = "Myinfo">
<h2>Photo/h2>
<p>PhotoLink Here</p>
</div><!-- end of Myinfo -->
</div><!-- end of Myitems -->
<div class = "Myitems">
<img src = "b1.png"></img>
<div class = "Myinfo">
<h2>Photo/h2>
<p>PhotoLink Here</p>
</div><!-- end of Myinfo -->
</div><!-- end of Myitems -->
<div class = "Myitems">
<img src = "b1.png"></img>
<div class = "Myinfo">
<h2>Photo/h2>
<p>PhotoLink Here</p>
</div><!-- end of Myinfo -->
</div><!-- end of Myitems -->
<div class = "Myitems">
<img src = "b1.png"></img>
<div class = "Myinfo">
<h2>Photo/h2>
<p>PhotoLink Here</p>
</div><!-- end of Myinfo -->
</div><!-- end of Myitems -->
<div class = "Myitems">
<img src = "b1.png"></img>
<div class = "Myinfo">
<h2>Photo/h2>
<p>PhotoLink Here</p>
</div><!-- end of Myinfo -->
</div><!-- end of Myitems -->
<div class = "Myitems">
<img src = "b1.png"></img>
<div class = "Myinfo">
<h2>Photo/h2>
<p>PhotoLink Here</p>
</div><!-- end of Myinfo -->
</div><!-- end of Myitems -->
</div><!-- slider id -->
</div><!-- end of Hero -->
</div>
</div>

Did you added twitter bootstrap slider or another. can you share live site url ? You can easily added default bootstrap slider here is code
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="photo.jpg" alt="photo">
<div class="carousel-caption">
CONTENT
</div>
</div>
<div class="item">
<img src="photo.jpg" alt="photo">
<div class="carousel-caption">
CONTENT
</div>
</div>
</div>
<a class="left carousel-control" href="#carousel-example-generic" 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="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>

Sorry I am a complete beginner I created a image slider from an example online. Unknown to me bootstrap has a image slider class and example on its homepage. Apologies I did not mean to waste anyone time!

Related

Changing li class with span id in Modal pop up

In my html page, I have an external javascript code, that causes a modal to pop up when a project in my html class is clicked. the projects are specified through the li class attribute. I now wish to chance this, so the modal instead pops up when a span id element is clicked. Therfor I have revisited by Javascript code, and changed the li class-attribute (in this case .Project) into the span id attribute (#PopUp. Unfortunately I have not been able to make my code work, through that. Is anyone able to see where I go wrong?
/* Javascript */
window.onload = function() {
span = document.querySelectorAll("#PopUp");
document.querySelectorAll("#PopUp").forEach(LIelm => {
LIelm.addEventListener('click', showHideModal)
})
};
function showHideModal(e) {
if (!e.target.parentNode.matches('#PopUp , .modal-content')) return
e.preventDefault();
let currentParent = e.target.parentNode;
if (currentParent.matches('#PopUp')) {
document.getElementById(currentParent.dataset.modal).style.display = "block";
} else {
currentParent.parentNode.style.display = "";
}
}
/* HTML */
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.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.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<div class="content">
<div id="contact">
About Contact: c.thornval#live.dk 0045 7158 0488
<br>
<br>
</div>
<ul style="list-style: none;">
<li class="Project" data-modal="myModal_1">
<span id="myBtn_1">Irma Type</span>
<span id="year">2019</span>
<div class="Describtion">
<span id="PopUp">Images</id>
<p style="display:none;">Typedesign<br></p>
</div>
<div id="myModal_1" class="modal">
<div class="modal-content">
<div id="demo" class="carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner">
<div class="carousel-item active">
<img src="Images/Lirma/type.jpg" alt="img" width="100%">
</div>
<!-- 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>
<p>Some text in the Modal...</p>
</div>
</div>
</div>
</li>
You have a couple of problems, first you cannot use an id because it seems like there would be multiple span elements and id's should be unique, secondly you are using the wrong selectors to determine wether the clicked item is a child of a parent containing a modal and your clicked element is now one level deeper.
Change you javascript code this:
window.onload = function() {
const span = document.querySelectorAll(".PopUp");
span.forEach(LIelm => {
LIelm.addEventListener('click', showHideModal)
})
};
function showHideModal(e) {
const projectNode = e.target.parentNode.parentNode;
if (!projectNode.matches('.Project, .modal-content')) return
e.preventDefault();
if (projectNode.matches('.Project')) {
document.getElementById(projectNode.dataset.modal).style.display = "block";
} else {
projectNode.parentNode.style.display = "";
}
}
Then change #PopUp to .PopUp
...
<li class="Project" data-modal="myModal_1">
<span id="myBtn_1">Irma Type</span>
<span id="year">2019</span>
<div class="Describtion">
<span class="PopUp">Images</id>
<p style="display:none;">Typedesign<br></p>
</div>
<div id="myModal_1" class="modal">
<div class="modal-content">
<div id="demo" class="carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner">
<div class="carousel-item active">
<img src="Images/Lirma/type.jpg" alt="img" width="100%">
</div>
<!-- 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>
<p>Some text in the Modal...</p>
</div>
</div>
</div>
</li>
...

Web development slider issue

How can i add two carousel slider in a single row? Is it possible to add two sliders in a single row?
like i want to do this
the white section on the left side i want to add another carousel the issue is this slider add to the bottom of first slider so i want add very nex to it any solution please.
<div class="container-fluid" >
<div class="row">
<!-- Carousel -->
<div id="position-setter">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators" id="abc">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
<li data-target="#carousel-example-generic" data-slide-to="3"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="img/first.jpg" alt="First slide" >
<!-- Static Header -->
<div class="header-text hidden-xs">
<div class="col-md-12 text-center">
<h2>
<span>Welcome to <strong>Ali Institute of Education</strong></span>
</h2>
<br>
<h3>
<span>Apply for Admission.</span>
</h3>
<br>
<div class="text-center">
<span class="glyphicon glyphicon-chevron-right"></span> <a class="btn btn-theme btn-sm btn-min-block" href="#">Apply</a> <span class="glyphicon glyphicon-chevron-left"></span></div>
</div>
</div><!-- /header-text -->
</div>
<div class="item">
<img src="img/second.jpg" alt="Second slide">
<!-- Static Header -->
</div>
<div class="item">
<img src="img/Third.jpg" alt="Third slide">
<!-- Static Header -->
<!-- /header-text -->
</div>
<div class="item">
<img src="img/Forth.jpg" alt="Third slide">
<!-- Static Header -->
<!-- /header-text -->
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div><!-- /carousel -->
</div>
</div>
</div>
</div>
I'm assuming from your snippet that you are using Twitter-Bootstrap.
It is possible, but you will need a wrapper. First of all, set the number of columns your first slider has to fill.
<div class="container-fluid" >
<div class="row">
<!-- Columns -->
<div class="col-xs-8">
<!-- Carousel -->
<div id="position-setter">
...
Then, make a wrapper for the other two carousels, and set its dimension to 12 - the number of columns your first carousel fills.
<div class="container-fluid" >
<div class="row">
<!-- Columns -->
<div class="col-xs-8">
<!-- Carousel -->
</div>
<!-- Wrapper -->
<div class="col-xs-4">
<!-- The other two carousels -->
<div class="row">
<div class="col-xs-12">
<!-- Second carousel -->
</div>
<div class="col-xs-12">
<!-- Third carousel -->
</div>
</div>
</div>
</div>
</div>
Then, set the second and third carousels height to half of the first carousel (or whatever ratio you need) and you are ok

How can I arrange this DIVs in partial view using bootstrap or Css?

I'm developing an online-store website using Asp.net MVC 5 and Razor Engine. I have a View for show products using Carousel . I show a small image of products in right of page (GoodDetails.cshtml) and then show more details in _GoodDetailsAjax.cshtml .
GoodDetails.cshtml
<div >
<div class="row">
<div class="col-lg-9 col-md-9" id="DivAjax">
#{Html.RenderAction("GoodDetailsAjax", new { id = Model.GoodDetails.FirstOrDefault().DetailsGoodID });}
</div>
<div class="col-lg-2 col-md-2 pull-right center-block" >
#foreach (var item1 in Model.GoodDetails)
{
<div>
<input type="image" class="img-responsive" src="~/Images/GoodDetails/#item1.DetailsSmallImage1">
</div>
#Ajax.ActionLink(#item1.DetailsName, "GoodDetailsAjax", new { id = #item1.DetailsGoodID }, new AjaxOptions()
{
HttpMethod = "GET",
UpdateTargetId = "DivAjax",
InsertionMode = InsertionMode.Replace
})
}
</div>
</div>
I want to full screen that div with InfoDiv id . How can I do it ? I tried Css and very bootstrap classes but I couldn't do it .
Thanks in advance .
_GoodDetailsAjax.cshtml
<div class="row container">
#foreach (var item in Model.GoodDetails)
{
<div style="height:auto;" class="carousel slide article-slide col-md-12 col-lg-12" id="article-photo-carousel">
<!-- Wrapper for slides -->
<div style="border:1px solid;" class="carousel-inner cont-slider">
<div class="item active">
<img alt="" title="" src="~/Images/GoodDetails/#item.DetailsImage1">
</div>
<div class="item">
<img alt="" title="" src="~/Images/GoodDetails/#item.DetailsImage2">
</div>
<div class="item">
<img alt="" title="" src="~/Images/GoodDetails/#item.DetailsImage3">
</div>
<div class="item">
<img alt="" title="" src="~/Images/GoodDetails/#item.DetailsImage4">
</div>
</div>
<!-- Indicators -->
<ol class="carousel-indicators text-center col-lg-12 col-md-12" >
<li class="active" data-slide-to="0" data-target="#article-photo-carousel">
<img alt="" src="~/Images/GoodDetails/#item.DetailsSmallImage1">
</li>
<li data-slide-to="1" data-target="#article-photo-carousel">
<img alt="" src="~/Images/GoodDetails/#item.DetailsSmallImage2">
</li>
<li data-slide-to="2" data-target="#article-photo-carousel">
<img alt="" src="~/Images/GoodDetails/#item.DetailsSmallImage3">
</li>
<li data-slide-to="3" data-target="#article-photo-carousel">
<img alt="" src="~/Images/GoodDetails/#item.DetailsSmallImage4">
</li>
</ol>
<a style="background:none !important;" class="left carousel-control" href="#article-photo-carousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a style="background:none !important;" class="right carousel-control" href="#article-photo-carousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<div id="InfoDiv" class="col-lg-12 col-md-12 " >
<p>#item.DetailsExtraInfo</p>
<p>#item.DetailsProducer</p>
<p>#item.DetailsSize</p>
}
</div>
You are updating the below code with ajax
<div class="col-lg-9 col-md-9" id="DivAjax">
#{Html.RenderAction("GoodDetailsAjax", new { id = Model.GoodDetails.FirstOrDefault().DetailsGoodID });}
</div>
This <div> has class="col-lg-9 col-md-9" so your partial view will also renders in the div with same class of class="col-lg-9 col-md-9". So this is the reason why your div in partial view is not full width.
You have to update the row code with ajax like below
<div class="col-md-12" id="DivAjax">
<div class="row">
<div class="col-lg-9 col-md-9" >
</div>
<div class="col-lg-2 col-md-2 pull-right center-block" >
#foreach (var item1 in Model.GoodDetails)
{
<div>
<input type="image" class="img-responsive" src="~/Images/GoodDetails/#item1.DetailsSmallImage1">
</div>
#Ajax.ActionLink(#item1.DetailsName, "GoodDetailsAjax", new { id = #item1.DetailsGoodID }, new AjaxOptions()
{
HttpMethod = "GET",
UpdateTargetId = "DivAjax",
InsertionMode = InsertionMode.Replace
})
}
</div>
</div>
</div>
and in the partial view
<div class="row container">
#foreach (var item in Model.GoodDetails)
{
<div class="row">
<div class="col-md-9">
<div style="height:auto;" class="carousel slide article-slide col-md-12 col-lg-12" id="article-photo-carousel">
<!-- Wrapper for slides -->
<div style="border:1px solid;" class="carousel-inner cont-slider">
<div class="item active">
<img alt="" title="" src="~/Images/GoodDetails/#item.DetailsImage1">
</div>
.
<li data-slide-to="3" data-target="#article-photo-carousel">
<img alt="" src="~/Images/GoodDetails/#item.DetailsSmallImage4">
</li>
</ol>
<a style="background:none !important;" class="left carousel-control" href="#article-photo-carousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a style="background:none !important;" class="right carousel-control" href="#article-photo-carousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<div class="col-md-2">
#foreach (var item1 in item)
{
<div>
<input type="image" class="img-responsive" src="~/Images/GoodDetails/#item1.DetailsSmallImage1">
</div>
#Ajax.ActionLink(#item1.DetailsName, "GoodDetailsAjax", new { id = #item1.DetailsGoodID }, new AjaxOptions()
{
HttpMethod = "GET",
UpdateTargetId = "DivAjax",
InsertionMode = InsertionMode.Replace
})
}
</div>
</div>
<div class="row">
<div id="InfoDiv" class="col-lg-12 col-md-12 " >
<p>#item.DetailsExtraInfo</p>
<p>#item.DetailsProducer</p>
<p>#item.DetailsSize</p>
</div>
</div>
}
</div>
You have to place the ajax form inside the partial view and for that you have to do little customize to your code
hope this will help you
There is small organisational error in your _GoodDetailsAjax.cshtml file as per Bootstrap. You have added col-md-12 after col-lg-12 which should be other way around.
GoodDetails.cshtml
<div class="container">
<div class="row">
<div class="col-md-9 col-lg-9" id="DivAjax">
<!-- product details starts -->
#{Html.RenderAction("GoodDetailsAjax", new { id = Model.GoodDetails.FirstOrDefault().DetailsGoodID });}
<!-- Product details ends -->
</div>
<div class="col-md-3 col-lg-3 pull-right center-block" >
#foreach (var item1 in Model.GoodDetails)
{
<div>
<input type="image" class="img-responsive" src="~/Images/GoodDetails/#item1.DetailsSmallImage1">
</div>
#Ajax.ActionLink(#item1.DetailsName, "GoodDetailsAjax", new { id = #item1.DetailsGoodID }, new AjaxOptions()
{
HttpMethod = "GET",
UpdateTargetId = "DivAjax",
InsertionMode = InsertionMode.Replace
})
}
</div>
</div>
</div>
_GoodDetailsAjax.cshtml
<div class="row">
#foreach (var item in Model.GoodDetails)
{
<div class="carousel slide article-slide" id="article-photo-carousel">
<!-- Wrapper for slides -->
<div style="border:1px solid;" class="carousel-inner cont-slider">
<div class="item active">
<img alt="" title="" src="~/Images/GoodDetails/#item.DetailsImage1">
</div>
<div class="item">
<img alt="" title="" src="~/Images/GoodDetails/#item.DetailsImage2">
</div>
<div class="item">
<img alt="" title="" src="~/Images/GoodDetails/#item.DetailsImage3">
</div>
<div class="item">
<img alt="" title="" src="~/Images/GoodDetails/#item.DetailsImage4">
</div>
</div>
<!-- Indicators -->
<ol class="carousel-indicators text-center" >
<li class="active" data-slide-to="0" data-target="#article-photo-carousel">
<img alt="" src="~/Images/GoodDetails/#item.DetailsSmallImage1">
</li>
<li data-slide-to="1" data-target="#article-photo-carousel">
<img alt="" src="~/Images/GoodDetails/#item.DetailsSmallImage2">
</li>
<li data-slide-to="2" data-target="#article-photo-carousel">
<img alt="" src="~/Images/GoodDetails/#item.DetailsSmallImage3">
</li>
<li data-slide-to="3" data-target="#article-photo-carousel">
<img alt="" src="~/Images/GoodDetails/#item.DetailsSmallImage4">
</li>
</ol>
<a style="background:none !important;" class="left carousel-control" href="#article-photo-carousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a style="background:none !important;" class="right carousel-control" href="#article-photo-carousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<div id="InfoDiv" class="" >
<p>#item.DetailsExtra0nfo</p>
<p>#item.DetailsProducer</p>
<p>#item.DetailsSize</p>
}
</div>
</div>
Fiddle: https://jsfiddle.net/dg0n28z5/3/
Hope that make sense.

Bootstrap image carousel, with text to the right

Okay, so I'm trying to get a webpage to show a Bootstrap image carousel, which works! But I want some text to the right of it. I'm not trying to get the text to change with the image, just be to the side.
Here is the HTML for the page;
http://pastebin.com/EabGfv3H#
And here is the custom CSS I'm using;
http://pastebin.com/MEtF1hTR
And a JSFiddle;
http://jsfiddle.net/swfour/52VtD/3942/
Needed code for JSFiddle link, so here is the html;
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div id="carousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel" data-slide-to="0" class="active"></li>
<li data-target="#carousel" data-slide-to="1"></li>
<li data-target="#carousel" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="images/Beaches and Villages\Golden Beach umbrellas home.JPG" alt="...">
<div class="carousel-caption">
Golden Beach
</div>
</div>
<div class="item">
<img src="images/Beaches and Villages\Limenas ancient city.jpg" alt="...">
<div class="carousel-caption">
Limenas
</div>
</div>
<div class="item">
<img src="images/Beaches and Villages\Potos sunset.JPG" alt="...">
<div class="carousel-caption">
Potos
</div>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel" 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="#carousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<div id="carousel_text" class="col-md-6">
<div>
<p>
Thasos, an island surrounded by the crystal-clear emerald waters of the Aegean Sea is part of the Northeastern islands of
Greece, also being the closest one to the continent. It is the perfect getaway for holidays during summer, a place where
you can relax and enjoy your holidays, forget about all your worries on a quiet sandy beach, but also a place where you
can explore the Greek way of life, try the best foods and meet the most amazing people.
</p>
</div>
</div>
</div>
I've tried not using the bootstrap columns and just using float left and right, which didn't work.
From your image mockup, I assume you need the carousel on some 75% width while the other text/div on remaining 25% width within your main container. OR the text/div should be outside of carousel.
So if that's the case, try using this -
add a new class carousel-left to <div id="carousel-example-generic" class="carousel slide carousel-left" data-ride="carousel">
add/update your text-div in html as shown below:
<div class="bs-example" data-example-id="simple-carousel">
<div id="carousel-example-generic" class="carousel slide carousel-left" data-ride="carousel">...</div>
<div class="some-text">your text div</div>
</div>
add following in your css -
.carousel-left { width: 75%; float: left; }
.some-text { float: left; width: 25%; }
Hope it helps.
I add pull-left class to img, and add pull-right class to your text and place it inside <span> not <div> and remove carousel-caption from it.seems to work Pluncker
<div class="item">
<img class="pull-left" src="images/Beaches and Villages\Limenas ancient city.jpg" alt="...">
<span class="pull-right">
Limenas
</span>
</div>

Making back image blur and front image clearly visible

I was working with carosel in bootstrap and I want background image to be blur and top image to be properly visible. For this I was using two classes in style but as a result both front and back images are coming blur. The fiddle for the same is here https://jsfiddle.net/v37wju8h/6/ . Please increase the screen size to check the problem with the result. Below is the code -
<div class="container">
<div id="carousel" class="carousel slide" data-ride="carousel">
<div class="carousel-inner"> <!-- Wrapper for slides -->
<div class="item active back_img" style="background-image:url('http://www.pluots.net/media/full/18/dining-table-contemporary-in-wood-home-fred-by-vladimir-dining-table-contemporary-in-wood-home-fred-by-vladimir.jpg');">
<img class="front_img" src="http://www.pluots.net/media/full/18/furniture-tips-to-make-marvellous-round-dining-table-furniture-tips-to-make-marvellous-round-dining-table.jpg"/>
<div class="carousel-caption">
<h3>Image1</h3>
</div>
</div>
<div class="item back_img" style="background-image:url('http://www.pluots.net/media/full/18/dining-table-contemporary-in-wood-home-fred-by-vladimir-dining-table-contemporary-in-wood-home-fred-by-vladimir.jpg');">
<img class="front_img" src="http://www.pluots.net/media/full/18/furniture-tips-to-make-marvellous-round-dining-table-furniture-tips-to-make-marvellous-round-dining-table.jpg" />
<div class="carousel-caption">
<h3>Image2 </h3>
</div>
</div>
<div class="item back_img" style="background-image:url('http://www.pluots.net/media/full/18/dining-table-contemporary-in-wood-home-fred-by-vladimir-dining-table-contemporary-in-wood-home-fred-by-vladimir.jpg');">
<img class="front_img" src="http://www.pluots.net/media/full/18/furniture-tips-to-make-marvellous-round-dining-table-furniture-tips-to-make-marvellous-round-dining-table.jpg" />
<div class="carousel-caption">
<h3>Image 3</h3>
</div>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel" role="button" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
<a class="right carousel-control" href="#carousel" role="button" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
</div>
</div>
You can use opacity
opacity: 0.5
position: relative;