I am using a \Css configuration which centers a caption under a figure thanks to how-to-make-caption-be-centered-under-table-when-using-tex4ht
Now I find this does not work if I change document class to koma-script !
Here is a MWE
%\documentclass[11pt]{scrbook}
\documentclass[11pt]{book}
\usepackage{graphicx}
\usepackage{float}
\begin{document}
\begin{figure}[H]
\centering
\includegraphics[width=0.5\textwidth]{example-image-b}
\caption{test image}
\end{figure}
\end{document}
Now compiled using make4ht -c my.cfg where my.cfg is
\Preamble{xhtml}
\Css{div.caption{text-align:center;}}
\Css{div.figure img {text-align:center;display:block;margin-left:auto; margin-right: auto;}}
\begin{document}
\EndPreamble
Gives the expected output

Now changed the document to
\documentclass[11pt]{scrbook}
And making no other changes and compiling again using same command, gives

Why would changing the document class makes the CSS configuration have no effect?
TL 2018
bookand of usingscrbook. Then, I've made the difference of thescrbookresult better human readable. Then, I've had a look into the generated css file to see, whether or not there are already style definitions fortableof classcaption(in css syntax:div.caption table) or for table rows. Then, I've had a look into the css guide to see, how to reduce the table to its natural width or to change its alignment. That's it. No magic. Only reading code and manuals (and spending some time). – Schweinebacke Feb 12 '19 at 06:36