before I used bootstrap.min.css but now I should use bootstrap v3.2.0.css because of Bootstrap Thumbnail Slider, but when i use Bootstrap 3.2.0 , my top menu not work, how i can have both of them? Bootstrap 3.2.0 Thumbnail Slider and top menu; in bow is my top menu that work with bootstrap.min.css but not work with bootstrap v3.2.0.css
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<div class="nav-collapse collapse">
<ul class="nav" id="top-nav">
<li>home</li>
<li>about</li>
<li>portfolio</li>
<li>contant</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
I find the problem, i change the code of Bootstrap Thumbnail Slider, and it work with bootstrap.min.css
<div class="container">
<div class="span8">
<h1>Bootstrap Thumbnail Slider</h1>
<div class="well">
<div id="myCarousel" class="carousel slide">
<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>
</ol>
<!-- Carousel items -->
<div class="carousel-inner">
<div class="item active">
<div class="row-fluid">
<div class="span3"><img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"></div>
<div class="span3"><img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"></div>
<div class="span3"><img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"></div>
<div class="span3"><img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"></div>
</div><!--/row-fluid-->
</div><!--/item-->
<div class="item">
<div class="row-fluid">
<div class="span3"><img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"></div>
<div class="span3"><img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"></div>
<div class="span3"><img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"></div>
<div class="span3"><img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"></div>
</div><!--/row-fluid-->
</div><!--/item-->
<div class="item">
<div class="row-fluid">
<div class="span3"><img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"></div>
<div class="span3"><img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"></div>
<div class="span3"><img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"></div>
<div class="span3"><img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"></div>
</div><!--/row-fluid-->
</div><!--/item-->
</div><!--/carousel-inner-->
<a class="left carousel-control" href="#myCarousel" data-slide="prev">‹</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">›</a>
</div><!--/myCarousel-->
</div><!--/well-->
</div>
</div>
.carousel {
margin-bottom: 0;
padding: 0 40px 30px 40px;
}
.carousel-control {
left: -12px;
}
.carousel-control.right {
right: -12px;
}
.carousel-indicators {
right: 50%;
top: auto;
bottom: 0px;
margin-right: -19px;
}
.carousel-indicators li {
background: #c0c0c0;
}
.carousel-indicators .active {
background: #333333;
}
Related
I'm new to bootstrap, so hoping someone can give me a little color around what I'm missing. Basically, I've developed several views and when I narrow the browser window down past 768 X 1024 my elements automatically expand to 100% of the view and the images get all distorted.
Here is what it looks like at 768 X 1024:
And here when I shrink the browser further:
So, you can see that the nav menu and each tile is stretching to full 100% at this point. What I would like is for the tiles and the menu to remain the same width when they stack. Here is the HTML for the navigation panel and the tiles:
CSS:
.typehead{
text-align:center;
/*height: 100px; */
background: #3f3f3f;
margin: -5px 0px -5px -5px !important;
border-radius: 5px;
font-weight: bold;
}
.myborderwrap{
border: 1px solid #000000;
border-radius: 10px;
}
.tiles{
padding-left: 50px !important;
margin-bottom: 25px;
}
.crystalcontainer{
padding: 15px 15px 5px 15px;
border-radius: 10px;
box-shadow: -15px 15px 5px #888888;
}
.crystalname{
font-size: 12pt;
font-weight: bold;
text-align: center;
padding-bottom: 10px;
border-bottom: 1px solid #000000;
word-wrap: break-word;
}
.ratingrow{
text-align: center;
color: #007d7d;
font-weight: bold;
font-style: italic;
}
.add{
border-radius: 10px;
text-align: center;
padding: 3px 10px 3px 10px;
margin-top: 3px;
cursor:pointer;
background: #000000;
font-size: 12pt;
}
.cdescwindow{
position: relative;
overflow: hidden;
padding: 0px !important;
margin-bottom: 0px !important;
}
.cdesccaption{
position:absolute;
top:0;
right:0;
background:rgba(66, 139, 202, 0.75);
width:100%;
height:100%;
display: none;
text-align:center;
color:#fff !important;
z-index:2;
}
.crystaldescription{
padding-top: 5px;
font-size: 12pt;
font-weight: bold;
}
HTML:
<body>
<div class="wrap">
<nav id="w029141" class="navbar-inverse navbar-fixed-top mymenuhead navbar" role="navigation">
<div class="container">
<div class="navbar-header">
<button class="navbar-toggle" data-target="#w029141-collapse" data-toggle="collapse" type="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/devfront/index.php">
<div class="row">
<img width="155px" height="55px" alt="" src="img/CMLogoSnowflake.gif">
<span style="font-style: italic; color: #f9f31c; font-size: 10pt;"> beta</span>
</div>
</a>
</div>
<div id="w029141-collapse" class="collapse navbar-collapse">
<ul id="w13562" class="navbar-nav nav" style="margin-left: 100px;">
<li>
DEV
</li>
<li class="active">
Subscribe
</li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
Publish
<b class="caret"></b>
</a>
<ul id="w226843" class="dropdown-menu">
<li>
<a tabindex="-1" href="/devfront/index.php?r=publish%2Fdashboard">My Published Crystals</a>
</li>
<li>
<a tabindex="-1" href="/devfront/index.php?r=publish%2Fselect-new">Publish New Crystal</a>
</li>
<li>
<a tabindex="-1" href="/devfront/index.php?r=publish%2Fprofile">Manage Profiles</a>
</li>
</ul>
</li>
</ul>
<ul id="w33960" class="navbar-nav nav">
<li>
My Crystals
</li>
</ul>
<div class="navbar-nav" style="padding-top:8px">
<div id="crystalcounter" class="badge" style="background:#ffff00; color:#000000; font-weight:bold;">2</div>
</div>
<ul id="w422097" class="navbar-nav navbar-right nav">
<li>
Home
</li>
<li>
About
</li>
<li>
My Profile
</li>
<li>
<a data-method="post" href="/devfront/index.php?r=site%2Flogout">Logout (scottjms)</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="mybackground">
<div class="container">
<div class="site-index">
<span id="soundspan"></span>
<input id="searchtype" type="hidden" value="0" name="type">
<input id="brandtype" type="hidden" value="0" name="btype">
<div class="text-left"> </div>
</div>
<div class="body-content">
<div class="row searcharea">
<div class="col-sm-3"></div>
<div class="col-sm-5" style="padding-right:0px">
<input id="crystalsearchbar" class="searchbar" type="text" placeholder="Find a crystal..." name="crystalsearch">
</div>
<div class="col-sm-1" style="padding-left:0px">
<div style="align: left; height: 42px; background-color: #3333cc; padding-left: 12px; width:50px; border-top-right-radius: 5px; border-bottom-right-radius: 5px;">
<i class="fa fa-search fa-2x" style="padding-top:5px; color:white;"></i>
</div>
</div>
<div class="col-sm-3" style="padding-left:20px">
<a class="publishrouter" href="?r=publish/select-new">
I want to publish my own!
<i class="fa fa-external-link"></i>
</a>
</div>
</div>
<div class="row">
<div class="col-sm-3" style="margin:35px 0px">
<div class="panel panel-danger">
<div class="panel-heading" style="padding: 5px 0px 5px 5px;">
<h3 class="panel-title">
<div class="row typehead">
<div class="col-sm-12">
<h4 style="color: #80ffff">Explore Crystals</h4>
</div>
</div>
</h3>
</div>
<div class="table">
<ul class="nav nav-pills nav-stacked kv-sidenav">
<li id="allheader" class="allheader">All Crystals</li>
<li id="header16" class="header">
<a class="kv-toggle" href="{url}">
<span class="opened" style="display:none">
<i class="indicator glyphicon glyphicon-chevron-down"></i>
</span>
<span class="closed">
<i class="indicator glyphicon glyphicon-chevron-right"></i>
</span>
Self Publishing
</a>
<ul class="nav nav-pills nav-stacked">
<li id="subtype1" class="subtype text-primary" style="padding:10px 0px 10px 25px; cursor:pointer;">» Blog Updates</li>
<li id="subtype29" class="subtype text-primary" style="padding:10px 0px 10px 25px; cursor:pointer;">» Social Media Posts</li>
<li id="subtype30" class="subtype text-primary" style="padding:10px 0px 10px 25px; cursor:pointer;">» My Events</li>
<li id="subtype31" class="subtype text-primary" style="padding:10px 0px 10px 25px; cursor:pointer;">» Build Your Own</li>
</ul>
</li>
<li id="header18" class="header">
<a class="kv-toggle" href="{url}">
<span class="opened" style="display:none">
<i class="indicator glyphicon glyphicon-chevron-down"></i>
</span>
<span class="closed">
<i class="indicator glyphicon glyphicon-chevron-right"></i>
</span>
Local Interest
</a>
<ul class="nav nav-pills nav-stacked">
<li id="subtype32" class="subtype text-primary" style="padding:10px 0px 10px 25px; cursor:pointer;">» Tonight's Dinner Specials</li>
<li id="subtype33" class="subtype text-primary" style="padding:10px 0px 10px 25px; cursor:pointer;">» Live Music Here</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div class="col-sm-9">
<div class="row" style="padding-top:35px"></div>
<div id="crystal-container" class="findcrystals">
<div id="crystalcontainer88" class="col-sm-3 tiles">
<div class="myborderwrap">
<div class="crystalcontainer" style="border:4px solid #80ffff;">
<div class="row">
<div class="crystalname">Blog Updates</div>
</div>
<div class="row">
<div class="thumbnail cdescwindow">
<div class="caption cdesccaption" style="display: none;">
<div class="crystaldescription">Get updated when your ....</div>
</div>
<div class="brandlogo">
<img class="catelogueimage" alt="" src="img/crystallogos/RBsalnmeicnterfalsit84783dar93UQ.png">
</div>
</div>
</div>
<div class="row icons">
<div class="row ratingrow">Not Rated </div>
<div id="crystal88" class="add open" title="Subscribe"> Subscribe </div>
</div>
</div>
</div>
</div>
<div id="crystalcontainer132" class="col-sm-3 tiles">
<div class="myborderwrap">
<div class="crystalcontainer" style="border:4px solid #80ffff;">
<div class="row">
<div class="crystalname">My Social Media Po..</div>
</div>
<div class="row">
<div class="thumbnail cdescwindow">
<div class="caption cdesccaption" style="display: none;">
<div class="crystaldescription">Any social..</div>
</div>
<div class="brandlogo">
<img class="catelogueimage" alt="" src="img/crystallogos/RBsalnmeicnterfalsit84783dar93UQ.png">
</div>
</div>
</div>
<div class="row icons">
<div class="row ratingrow">Not Rated </div>
<div id="crystal132" class="add open" title="Subscribe"> Subscribe </div>
</div>
</div>
</div>
</div>
<div id="crystalcontainer133" class="col-sm-3 tiles">
<div class="myborderwrap">
<div class="crystalcontainer" style="border:4px solid #80ffff;">
<div class="row">
<div class="crystalname">My Events</div>
</div>
<div class="row">
<div class="thumbnail cdescwindow">
<div class="caption cdesccaption" style="display: none;">
<div class="crystaldescription">All of the upcoming...</div>
</div>
<div class="brandlogo">
<img class="catelogueimage" alt="" src="img/crystallogos/RBsalnmeicnterfalsit84783dar93UQ.png">
</div>
</div>
</div>
<div class="row icons">
<div class="row ratingrow">Not Rated </div>
<div id="crystal133" class="add open" title="Subscribe"> Subscribe </div>
</div>
</div>
</div>
</div>
<div id="crystalcontainer134" class="col-sm-3 tiles">
<div class="myborderwrap">
<div class="crystalcontainer" style="border:4px solid #80ffff;">
<div class="row">
<div class="crystalname">Build Your Own</div>
</div>
<div class="row">
<div class="thumbnail cdescwindow">
<div class="caption cdesccaption">
<div class="crystaldescription">Any event..</div>
</div>
<div class="brandlogo">
<img class="catelogueimage" alt="" src="img/crystallogos/RBsalnmeicnterfalsit84783dar93UQ.png">
</div>
</div>
</div>
<div class="row icons">
<div class="row ratingrow">Not Rated </div>
<div id="crystal134" class="add open" title="Subscribe"> Subscribe </div>
</div>
</div>
</div>
</div>
<div id="crystalcontainer135" class="col-sm-3 tiles">
<div class="myborderwrap">
<div class="crystalcontainer" style="border:4px solid #80ffff;">
<div class="row">
<div class="crystalname">Local Dinner Speci..</div>
</div>
<div class="row">
<div class="thumbnail cdescwindow">
<div class="caption cdesccaption" style="display: none;">
<div class="crystaldescription">Tonights dinner..</div>
</div>
<div class="brandlogo">
<img class="catelogueimage" alt="" src="img/crystallogos/RBsalnmeicnterfalsit84783dar93UQ.png">
</div>
</div>
</div>
<div class="row icons">
<div class="row ratingrow">Not Rated </div>
<div id="crystal135" class="add open" title="Subscribe"> Subscribe </div>
</div>
</div>
</div>
</div>
<div id="crystalcontainer138" class="col-sm-3 tiles">
<div class="myborderwrap">
<div class="crystalcontainer" style="border:4px solid #80ffff;">
<div class="row">
<div class="crystalname">Local Live Music E..</div>
</div>
<div class="row">
<div class="thumbnail cdescwindow">
<div class="caption cdesccaption" style="display: none;">
<div class="crystaldescription">Live music events ..</div>
</div>
<div class="brandlogo">
<img class="catelogueimage" alt="" src="img/crystallogos/RBsalnmeicnterfalsit84783dar93UQ.png">
</div>
</div>
</div>
<div class="row icons">
<div class="row ratingrow">Not Rated </div>
<div id="crystal138" class="add open" title="Subscribe"> Subscribe </div>
</div>
</div>
</div>
</div>
<div id="crystalcontainer145" class="col-sm-3 tiles">
<div class="myborderwrap">
<div class="crystalcontainer" style="border:4px solid #ffff00;">
<div class="row">
<div class="crystalname">Black Dog Dinner S..</div>
</div>
<div class="row">
<div class="thumbnail cdescwindow">
<div class="caption cdesccaption">
<div class="crystaldescription">Our daily ..</div>
</div>
<div class="brandlogo">
<img class="catelogueimage" alt="" src="img/crystallogos/2lAPaXs-EYT3iNNQFh0a3hxIl.png">
</div>
</div>
</div>
<div class="row icons">
<div class="row ratingrow">Not Rated </div>
<div id="crystal145" class="add branded" title="Subscribe"> Subscribe </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
You are only using COL-SM which only effects small screens. You need to add the class "col-XS" to tell bootstrap what to do on extra small screens. By default it is "col-xs-12" which stacks.
Here is the fiddle I made for you. You can see on an extra-small screen size the "tiles" are going to show 2 to a row. because i gave them this class: Col-xs-6
https://jsfiddle.net/93bg9v2z/2/
edit: based on your request here is the new fiddle
https://jsfiddle.net/93bg9v2z/3/
So I built this "testimonial" slider on my website using bootstrap's carousel plugin but for some reason the movement seems clunky when it changes slides.. I'm not sure if it's my doing on the CSS because I styled on top of some of the elements and I don't really know too much of CSS..
Anyway, here's my code:
HTML
<div class="container-fluid">
<div class="row testimonials">
<div class="container">
<div class="row">
<div class="col-md-12">
<h3 class="text-center">Testimonials</h3>
</div>
</div>
<div class="carousel slide" id="testimonial_slider" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#testimonial_slider" data-slide-to="0" class="active"></li>
<li data-target="#testimonial_slider" data-slide-to="1"></li>
<li data-target="#testimonial_slider" data-slide-to="2"></li>
</ol>
<div class="carousel-inner" role="listbox">
<div class="row item active">
<div class="col-md-6 testimonial">
<img src="my-image-url.jpg">
<p><i class="fa fa-quote-left"></i> The content</p>
<span>The Title</span>
</div>
<div class="col-md-6 testimonial">
<img src="my-image-url.jpg">
<p><i class="fa fa-quote-left"></i> The content</p>
<span>The Title</span>
</div>
</div>
<div class="row item active">
<div class="col-md-6 testimonial">
<img src="my-image-url.jpg">
<p><i class="fa fa-quote-left"></i> The content</p>
<span>The Title</span>
</div>
<div class="col-md-6 testimonial">
<img src="my-image-url.jpg">
<p><i class="fa fa-quote-left"></i> The content</p>
<span>The Title</span>
</div>
</div>
<div class="row item active">
<div class="col-md-6 testimonial">
<img src="my-image-url.jpg">
<p><i class="fa fa-quote-left"></i> The content</p>
<span>The Title</span>
</div>
<div class="col-md-6 testimonial">
<img src="my-image-url.jpg">
<p><i class="fa fa-quote-left"></i> The content</p>
<span>The Title</span>
</div>
</div>
</div>
</div>
</div>
</div>
And the CSS:
.testimonials {
padding-bottom:30px;
}
.testimonial {
position:relative;
height:100px;
margin:10px 0 20px 0;
padding:0 20px 20px 120px;
box-sizing:border-box;
}
.testimonial p i {
color:#eb7022;
}
.testimonial span {
position:absolute;
bottom:0;
left:130px;
}
.testimonial img {
height:100px;
width:100px;
margin-right:120px;
border-radius:6px;
position:absolute;
top:0;
left:16px;
}
You can also see it live here.
Am I breaking something with these styles?
Any help appreciated, thanks!
Don't use .row with .item.
Apply .active class only to first item.
Instead of this:
<div class="row item active">
<div class="col-md-6 testimonial">
<img src="1.jpg">
<p><i class="fa fa-quote-left"></i> The content</p>
<span>The Title</span>
</div>
<div class="col-md-6 testimonial">
<img src="1.jpg">
<p><i class="fa fa-quote-left"></i> The content</p>
<span>The Title</span>
</div>
</div>
Use this:
<div class="item active">
<div class="row>
<div class="col-md-6 testimonial">
<img src="1.jpg">
<p><i class="fa fa-quote-left"></i> The content</p>
<span>The Title</span>
</div>
<div class="col-md-6 testimonial">
<img src="1.jpg">
<p><i class="fa fa-quote-left"></i> The content</p>
<span>The Title</span>
</div>
</div>
</div>
Hi i am trying to make a bootstrap3 carousel slider and I want to add some images as the slide indicators instead of the list default circles.
Html Markup :
<div id="carousel-slider" class="carousel slide" data-ride="carousel" data-interval="5000">
<!-- Slider Indicators -->
<ul class="carousel-indicators">
<li data-target="#carousel-slider" data-slide-to="0" class="active"></li>
<li data-target="#carousel-slider" data-slide-to="1"></li>
<li data-target="#carousel-slider" data-slide-to="2"></li>
</ul><!--/ Indicators end-->
</div>
if i add an img tag as below :
<div id="carousel-slider" class="carousel slide" data-ride="carousel" data-interval="5000">
<!-- Slider Indicators -->
<ul class="carousel-indicators">
<li data-target="#carousel-slider" data-slide-to="0" class="active">
<div class="thumbnail">
<img class="img-responsive" src="https://s3.amazonaws.com/ooomf-com-files/wdXqHcTwSTmLuKOGz92L_Landscape.jpg">
</div></li>
<li data-target="#carousel-slider" data-slide-to="1"></li>
<li data-target="#carousel-slider" data-slide-to="2"></li>
</ul><!--/ Indicators end-->
<div>
Its not showing anything. How can I achieve adding an image as the indicator rather than the circle?
I think the most important thing is to override the width and height properties on the li tags inside the .carousel-indicators.
To do so I've created an additional modifier css class called .carousel-indicators--thumbnails that is added to the .carousel-indicators div. This modifier class is used to override the li, .active and .active .thumbnail class.
.carousel-indicators.carousel-indicators--thumbnails li {
width: 80px;
height: 40px;
margin: 0;
border: none;
border-radius: 0;
}
.carousel-indicators.carousel-indicators--thumbnails .active {
background-color: transparent;
}
.carousel-indicators.carousel-indicators--thumbnails .active .thumbnail {
border-color: #337ab7;
}
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet" />
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<div class="container">
<div class="row">
<div class="col-xs-12 col-md-8 col-md-offset-2">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel" data-interval="5000">
<!-- Indicators -->
<ol class="carousel-indicators carousel-indicators--thumbnails">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active">
<div class="thumbnail">
<img src="http://www.fillmurray.com/800/400" class="img-responsive">
</div>
</li>
<li data-target="#carousel-example-generic" data-slide-to="1">
<div class="thumbnail">
<img src="http://www.fillmurray.com/800/401" class="img-responsive">
</div>
</li>
<li data-target="#carousel-example-generic" data-slide-to="2">
<div class="thumbnail">
<img src="http://www.fillmurray.com/800/402" class="img-responsive">
</div>
</li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="http://www.fillmurray.com/800/400" width="800" height="400">
<div class="carousel-caption">
Slide 1
</div>
</div>
<div class="item">
<img src="http://www.fillmurray.com/800/401" width="800" height="400">
<div class="carousel-caption">
Slide 2
</div>
</div>
<div class="item">
<img src="http://www.fillmurray.com/800/402" width="800" height="400">
<div class="carousel-caption">
Slide 3
</div>
</div>
</div>
<!-- Controls -->
<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>
</div>
</div>
</div>
Please i wanna help in my slideshow>>>
My problem is: i want to put a panel on the slide show,, but when i tried to give that panel (- margin) the slideshow goes to right and made a scroll in the page!!
That't my code
<div class="room-booking">
<div class="container">
<div class="col-lg-2">
<div class="room-booking">
<p style="color:#f8c45a; padding:20px 30px; margin:0px;">1/4</p>
</div> <!-- End room-booking -->
</div> <!-- End col-lg-4 -->
</div> <!-- End Container -->
</div>
<!-- Carousel -->
<div data-ride="carousel" class="carousel slide" id="carousel-example-generic" style="z-index:0">
<ol class="carousel-indicators">
<li data-slide-to="0" data-target="#carousel-example-generic" class="custom-indicators" ></li>
<li data-slide-to="1" data-target="#carousel-example-generic" class="custom-indicators"></li>
<li data-slide-to="2" data-target="#carousel-example-generic" class="custom-indicators active"></li>
<li data-slide-to="3" data-target="#carousel-example-generic" class="custom-indicators"></li>
</ol>
<div class="carousel-inner">
<div class="item">
<img class="img-responsive" alt="First slide" data-src="holder.js/900x500/auto/#777:#555/text:First slide" src="img/pic1.png" style="margin-left:auto; margin-right:auto; width:100%; height:636px;">
</div>
<div class="item">
<img class="img-responsive" alt="Second slide" data-src="holder.js/900x500/auto/#666:#444/text:Second slide" src="img/pic1.png" style="margin-left:auto; margin-right:auto; width:100%; height:636px;">
</div>
<div class="item active">
<img class="img-responsive" alt="Third slide" data-src="holder.js/900x500/auto/#555:#333/text:Third slide" src="img/pic1.png" style="margin-left:auto; margin-right:auto; width:100%; height:636px;">
</div>
<div class="item">
<img class="img-responsive" class="img-responsive" alt="Forth slide" data-src="holder.js/900x500/auto/#666:#444/text:Forth slide" src="img/pic1.png" style="margin-left:auto; margin-right:auto; width:100%; height:636px;">
</div>
</div>
<a data-slide="prev" href="#carousel-example-generic" class="left-arrow">
<div class="halfCircleLeft"><span style="padding:15px 0px 0px 5px;" class="glyphicon glyphicon-chevron-left"></span></div>
</a>
<a data-slide="next" href="#carousel-example-generic" class="right-arrow">
<div class="halfCircleRight"><span style="padding:15px 0px 0px 0px;" class="glyphicon glyphicon-chevron-right"></span></div>
</a>
</div>
<!-- END Carousel -->
Something like this >>
http://postimg.org/image/k7c5hl7yx/
What you are trying to add is called a caption. Try the following on each slide you want to add to:
<div class="item active">
<img src="..." alt="...">
<div class="carousel-caption">
<h3>...</h3>
<p>...</p>
</div>
</div>
Bootply: http://www.bootply.com/66501
I want to put hero-unit box in the middle of the page (vertically). I set the size(span10) for the box. Also, there is a problem that the text from the bar is a little bit off and I don't know the reason. Please help me out!
<div id="myCarousel" class="carousel slide fullscrn">
<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>
</ol>
<!-- Carousel items -->
<div class="carousel-inner">
<div class="item active fullscrn">
<img src="http://placehold.it/600x480" class="fullscrn">
</div>
<div class="item fullscrn">
<img src="http://placehold.it/600x480" class="fullscrn">
</div>
<div class="item fullscrn">
<img src="http://placehold.it/600x480" class="fullscrn">
</div>
</div> <a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a>
<a class="carousel-control right" href="#myCarousel" data-slide="next">›</a>
</div>
<div class="hero-unit span10">
<h1>Test</h1>
<p>
</p><div class="progress progress-striped active">
<div class="bar" style="width: 11%;">11%</div>
</div>
<p></p>
<p>
<a class="btn btn-primary btn-large">
Learn more
</a>
</p>
</div>
for CSS:
.fullscrn{
height: 100%;
width:100%;
}
here is your solution
<div id="full-screen-slider" class="carousel slide">
<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>
</ol>
<div class="carousel-inner">
<div class="item active fullscrn">
<img src="http://placehold.it/600x480" class="fullscrn">
</div>
<div class="item fullscrn">
<img src="http://placehold.it/600x480" class="fullscrn">
</div>
<div class="item fullscrn">
<img src="http://placehold.it/600x480" class="fullscrn">
</div>
</div>
<a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a> <a class="carousel-control right"
href="#myCarousel" data-slide="next">›</a>
</div>
<style>
#full-screen-slider
{
margin-bottom: 0;
}
.carousel .carousel-inner .item img
{
width: 100%;
}
.all-sliders
{
position: fixed;
top: 25px;
right: 25px;
color: white;
z-index: 10;
}
.all-sliders:hover
{
color: white;
}
</style>
<div style="top: 21%; left: 16%; position: absolute;" class="container">
<div class="content">
<div class="hero-unit span10 ">
<h1>
Test</h1>
<p>
</p>
<div class="progress progress-striped active">
<div class="bar" style="width: 11%;">
11%</div>
</div>
<p>
</p>
<p>
<a class="btn btn-primary btn-large">Learn more </a>
</p>
</div>
</div>
</div>
<script src="Scripts/bootstrap.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
function setFullScreen() {
browserHeight = $(window).height();
$("#full-screen-slider .carousel-inner .item img").css({
height: browserHeight - 20
});
}
$("#full-screen-slider .carousel-inner .item:eq(0)").addClass('active');
setFullScreen();
$(window).resize(function () {
setFullScreen();
});
$("#full-screen-slider").carousel({ interval: 5000 });
if ($('.content').length > 0) {
$('.content').css('height', ($(window).height() - $('.content-section').offset().top - 120));
}
});
</script>