-
DataSmasher
I am having a really hard time understanding how to override the customize setting for line spacing in typography. I’m referring to the space inbetween rows of text. If you look at this post. https://www.blueridgebirdwatcher.com/blackbirds-2/ you can see that the text that I’m using for the image captions seems to be following the same line spacing as the paragraph text. This is perfectly understandable but in the absence of any way to simply add the image caption (which in all honesty I think is shocking – there must be something really complicated about that when you consider the robust features of your software) then my next choice is to edit this locally but I can’t figure out how.
Related to the same topic. Is there CSS or code that would automatically place the caption under the image in a particular way and allow me to edit it when not needed? How does one overcome this issue normally?
Thank you,
Dona -
Alvind
Hi there,
The Image block provides an option to add a caption via its block toolbar, which applies the
<figcaption>
tag to the caption text.
https://cln.sh/Ch3lD5C3This approach ensures that the caption is not affected by the line height of the paragraph text.
It appears you manually added a Paragraph block for the caption, which is likely why you’re experiencing line height issues.
-
DataSmasher
Hi Alvind
Thank you for reminding me of that. However I’ve changed the text to Caption and set the size to 1 rem and the result is slightly smaller text but the spacing between the lines looks the same.Live page: https://www.blueridgebirdwatcher.com/blackbirds-2/
Practice page with screen shot of admin side: https://www.blueridgebirdwatcher.com/practice/What am I doing wrong?
Thanks -
Hi there,
It’s inheriting the line-height that you’ve set for the entire site.
You could add some CSS like this to fix that:
figcaption { line-height: 1.5em; }
Adding CSS: https://docs.generatepress.com/article/adding-css/
Hope this helps 🙂
-
DataSmasher
OHHHH – that makes sense. Do I place this just below the other CSS I just added for the column structure?
-
Yup that should work 🙂
- You must be logged in to reply to this topic.