Center image in PDF output by CSS
Posted: Wed Apr 04, 2018 12:48 pm
Hi,
I use CSS to format images. Here are my styles:
But in the output it seems to make no effect. Example:
I use CSS to format images. Here are my styles:
Code: Select all
/* ==================================================
*
* <fig>
*
* The fig element is a figure (sometimes called an
* "exhibit") with an optional title for a wide variety
* of content.
*/
*[class ~= "topic/fig"] {
display: block;
font-style: italic;
margin-left:auto;
margin-right:auto;
}
/*
* The figure titles are italic only in the stand-alone application.
*/
*[class ~= "topic/fig"] > *[class ~= "topic/title"] {
font-style: italic;
font-size: 12px;
text-align: center;
color: #4B4646;
}
/* Center the image within it's fig container */
*[class~="topic/fig"] > *[class~="topic/image"] {
text-align: center;
margin-left:auto;
margin-right:auto;
}