-
DescriptionSuppose, in a blog-post writing, I have a very small figure with a short caption.
Then, the figure caption tries to migrate away from the figure itself and want none of the figure itself. To solve this, one way I found is this
Although, this makes it out of style because all other figure captions are left-aligned. What I want is the figure itself is center aligned, and the figure caption starts at the leftmost edge of the figure, but left-aligned. This may go multiple lines, but at least it should be bound by the width of the figure. How do I do this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
As documented figures are centred and captions left aligned by default. There are various discussions already on this topics (I let you search for them). This being said figure alignment can be controlled as many other components, see the documentation: https://quarto.org/docs/authoring/figures.html
If you are only using HTML, you need to figure out the right CSS rule to make what you want.
That's your point of view which I personally disagree because it would make the layout very weird for small width figure with very long caption. |
Beta Was this translation helpful? Give feedback.
Here is one approach (not perfect) because I had some spare time but I think this is a bad idea which is obvious.
I won't explain the approach nor the code, so you'll have to learn CSS/HTML/JavaScript if you don't understand.
Details