Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
163
rated 0 times [  164] [ 1]  / answers: 1 / hits: 22192  / 10 Years ago, mon, may 5, 2014, 12:00:00

I follow this tutorial to make Carousel slide .



When I define each item contain image and paragraph as -



<div class=item>
<img src=http://placehold.it/1200x480 alt= />
<div class=carousel-caption>
<p>Caption text here</p>
</div>
</div>


it's work fine (here its jsFiddle) .



But when I reduce it to paragraph only as -



<div class=item>
<div class=carousel-caption>
<p>Caption text here</p>
</div>
</div>


it stop working (here its jsFiddle) .



How could I make it work with only paragraph such that is slide the text each switch ?


More From » jquery

 Answers
45

The position property of the .carousel-caption was causing the problem, without the image it goes haywire, so set it to static:



.carousel-caption{
position:static;
}


Here's the demo of it working both with and without image:



DEMO


[#71182] Friday, May 2, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
maxh

Total Points: 137
Total Questions: 100
Total Answers: 103

Location: Kazakhstan
Member since Mon, Sep 26, 2022
2 Years ago
maxh questions
Tue, May 18, 21, 00:00, 3 Years ago
Mon, Jan 4, 21, 00:00, 3 Years ago
Mon, Nov 23, 20, 00:00, 4 Years ago
;