Reputation: 1005
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>Photo<a href = "#"></a>Link 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>Photo<a href = "#"></a>Link 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>Photo<a href = "#"></a>Link 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>Photo<a href = "#"></a>Link 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>Photo<a href = "#"></a>Link 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>Photo<a href = "#"></a>Link Here</p>
</div><!-- end of Myinfo -->
</div><!-- end of Myitems -->
</div><!-- slider id -->
</div><!-- end of Hero -->
</div>
</div>
Upvotes: 0
Views: 304
Reputation: 1005
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!
Upvotes: 0
Reputation: 76
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>
Upvotes: 1