CSS-based PDF: Table font size

Post here questions and problems related to editing and publishing DITA content.
mdslup
Posts: 167
Joined: Tue Mar 06, 2018 1:34 am

CSS-based PDF: Table font size

Post by mdslup »

I have a CSS rule that I expect to control all text size in my PDF:

.body {
font-size: 13px;
}

However, the text size within a table seems to be *larger* in my merged HTML file, but *smaller* in my resulting PDF.

Is table text size controlled elsewhere?
Dan
Posts: 501
Joined: Mon Feb 03, 2003 10:56 am

Re: CSS-based PDF: Table font size

Post by Dan »

Hello,

This is caused by a compatibility mode that sets the HTML tables font size to "medium". In fact this should not apply, as the format is HTML 5. I will log a bug about this. Meantime, you should add also this selector:

Code: Select all


*[class ~= "topic/table"] {
font-size: 13px;
}
Many regards,
Dan
mdslup
Posts: 167
Joined: Tue Mar 06, 2018 1:34 am

Re: CSS-based PDF: Table font size

Post by mdslup »

Great, thanks.
Post Reply