Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using flickity to display images from a database.i have managed to get the images in html.i can't add captions to the images.help me to add captions at the bottom of the image. if there is another plugin which can do similar thing please let me know and send the code as well.i need an answer asap


What I have tried:

<pre><h3 style="text-align: left;margin-bottom: 30px,margin-top: 30px">Home 
 Improvement</h3>
<div class="carousel" data-flickity='{ "groupCells": 
false,"cellAlign":"left","initialIndex": 2,"resize": true,"freeScroll": 
true,"freeScrollFriction": 0.03,"wrapAround": true}'>   
<?php foreach ($homeimprovement as $row ) {   ?>  
<div> <img src="<?php echo base_url().'assets/images/'.$row['ImageUrl']?>" 
class="gallery"/></div> 



this is the css gallery class for the the image.if you can edit the css for me to add description to the flickity i'll be happy


.gallery {
border: 1px solid #ddd;
border-radius: 5px;
padding: 10px;
width: 300px;
height: 200px;
margin: 10px;
}
Posted
Updated 7-Nov-17 2:26am

1 solution

Can you send me the code to review ? Otherwise try add after this line
<img src="<?php echo base_url().'assets/images/'.$row['ImageUrl']?>" 
class="gallery"/><
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900