0

I have a fancybox gallery, I want to add a name below each image as description before it is opened. For some reason I can't figure this out. My code:

 <a class="fancybox" href="images/fb1.jpg" data-fancybox-group="gallery"               title="Automated Batching System"><img src="images/fb1_t.jpg" alt="Automated Batching System" class="imgrnd"  /></a>

If I try to add a paragraph or something below each image it forces the next image to a new line.

Your help would be welcome, thanks

  • Code is above. I have a gallery of 15 images, I want to add a description below each image that the visitor sees before he clicks on the image. – Deon Stander Feb 13 '15 at 09:13

1 Answers1

-1

Please elaborate with relevant code sample and, if possible, a jsfiddle to show what exactly it is that you want.

Edit: Please see this link as it gives a simple solution How to write a caption under an image?

In your case, just try to enclose each image inside a div, and set the 'float' css property to 'left'

<div>
<a class="fancybox" href="images/fb1.jpg" data-fancybox-group="gallery" title="Automated Batching System">
<figure>
<img src="images/fb1_t.jpg" alt="Automated Batching System" class="imgrnd"/>   
<figcaption>Some title</figcaption>
</figure>
</a>
</div>

<div>
<a class="fancybox" href="images/fb1.jpg" data-fancybox-group="gallery" title="Automated Batching System">

<figure>
<img src="images/fb1_t.jpg" alt="Automated Batching System" class="imgrnd"  />
<figcaption>some Title</figcaption>
</figure></a>
</div>

And your CSS property:

div
{
float:left;
}

Hope this helps

Community
  • 1
  • 1
user3655614
  • 56
  • 1
  • 6