artpolikarpov / fotorama

A simple, stunning, powerful jQuery gallery.
http://fotorama.io
Other
1.58k stars 380 forks source link

Caption always inside image (left) #560

Open rucksman opened 4 years ago

rucksman commented 4 years ago

Is there a way to have the captions always on the bottom left of the image?

In this example here (https://fotorama.io/examples/captions/) the first picture is exactly how I would like to have it: image

The second picture shows the problem: The caption is not left bottom of the image but left bottom of the container which results in a misplaced caption: image

The desired result would be: image

Also for the third picture which is portrait it is not ideal: image

Better would be: image

So the caption container should get the same "left" as the image: image

As the image changes its size (and so its "left") when changing into kiosk mode (F11 in most browsers) or change windows size, the same should happen to the "left" of the caption container.

andregriffin commented 3 years ago

Trying to achieve the same thing here, but I can't get my head around where this is applied in the JS. I've duplicated the 'captions' items and created a 'titles' so that I could render titles for each image in addition to the caption, all from data-attributes. Just trying to get them positioned relative to the image seems to be my biggest stumbling block.