Confluence Cloud change font size of div in PDF Export

I have some content wrapped in a div macro that I am trying to set to a smaller font size. (8pt) I have already added this to the PDF Export Stylesheet to control the font of the whole document and it works correctly:

body,p,li,td,table,tr,.bodytext,.stepfield {
    font-size: 11pt;
}

 

But I cannot get this to work at all:

div.smalltext {
    font-size: 8pt;
}

 

This does work however:

div.smalltext {
    display: none;
}

so I think I am selecting it correctly there must just be something with the font I do not understand?

What is even stranger is that it is affecting the display in Confluence as if I had added it to the stylesheet for this space and not the PDF stylesheet...??????? The content inside of my div.smalltext is displaying in my browser at a smaller font size but when I export it goes back to the standard size font.

 

Since I cannot post more than one comment or question per day I will add to my original question:

I tried:

div.smalltext {
    font-size: 80%;
}

and also using em. The only way I can get it to work is by changing my previous code:

body,p,li,td,table,tr,.bodytext,.stepfield {
    font-size: 11pt;
}

to n% or nem. Then the div.smalltext works correctly. I think I understand what you mean by fixed size and surrounding text but I tried setting the div.smalltext font-size value from 8pt all the way to 20pt and the size of the text still did not change...

1 answer

This widget could not be displayed.

The use of npt will result in a fixed size, so if the text around it is already equivalent to the size, you won't see a difference. It is better web practice to use nem or n% to better predict what the visual difference will be.

Try those designations to see what the results are.

I could only post one question a day so I edited my original post to include more info.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

342 views 2 5
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you