Place caption below image
Posted: Wed May 16, 2018 6:24 pm
Hi,
I use CSS for my DITA->PDF transformation and would like to place image caption within the <fig> element below the image itself. I tried it this way but it does not work.
Many thanks for any help
I use CSS for my DITA->PDF transformation and would like to place image caption within the <fig> element below the image itself. I tried it this way but it does not work.
Code: Select all
/*
This centers the title text and the image if the image has the
placement attribute set to inline. The inline placement is the the default.
*/
*[class ~= "topic/fig"] {
text-align: center;
}
/* Other images, with break placement. */
*[class ~= "topic/image"][placement = 'break'] {
display: block;
text-align: center;
order: 1;
}
*[class ~= "topic/fig"] > *[class ~= "topic/title"]{
font-style: italic;
font-weight:normal;
font-size: 12px;
text-align: center;
color:#A3A3A3;
display: flex;
flex-flow: column;
order: 2;
}