Click here to Skip to main content
13,349,033 members (70,906 online)
Rate this:
 
Please Sign up or sign in to vote.
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 6-Nov-17 13:07pm
Updated 7-Nov-17 3:26am

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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"/><
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web01 | 2.8.180111.1 | Last Updated 7 Nov 2017
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100