bicarlsen / obsidian_image_caption

Add captions to images in Obsidian.
GNU General Public License v3.0
88 stars 3 forks source link

Caption centering #5

Closed Alekssavin closed 2 years ago

Alekssavin commented 2 years ago

Hi. It looks like there is there is no option to align the caption with the image itself. The caption starts in the beginning of the new line. image

bicarlsen commented 2 years ago

Thank you for the suggestion.

How are you aligning the image? Do you have a suggestion about the best way to allow for caption alignment? Should it be a global setting? Sould it be an option you include with the caption so it only applies locally?

You can use the custom CSS setting for alignment, but that would apply globally, which I guess isn't what you want.

siphyshu commented 2 years ago

Hey @bicarlsen, How would you apply the custom CSS for center alignment globally?

bicarlsen commented 2 years ago

Add text-align: center; to Settings > Image Caption > CSS. You can place any CSS style you want there.

Alekssavin commented 2 years ago

That's what I wanted, thank you. Images are not centered together with the caption automatically, so I guess I'll have to center them with CSS snippets applied to Obsidian.

bicarlsen commented 2 years ago

Great :)

If you have any suggestions on how to better implement alignment, I'm certainly open to the feedback.