Skip to content

Is it possible to caption an aligned image? #4082

Answered by squidfunk
Sonosus asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, that's possible. You have to float elements left or right, either by adding your own CSS, or by reusing the inline and inline end modifiers as provided for admonitions – those work on other elements, too. So probably something like:

<figure class="inline end" markdown>
  ![image7](images/3340breakout-module-01.jpg)
  <figcaption>An assembled 'base' PCB</figcaption>
</figure>

Note that the inline modifiers will rescale your image to be as wide as the admonition in the example I linked, and stretch to full width on mobile viewports. If you want to customize the appearance, just add your own classes.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Sonosus
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants