-3

I am trying to style the header of a panel in confluence by calling out a specific Macro.

I can style the panel header fine by using:

.panelHeader {
color:xxx
Font-Family:xxx
}

The issue is when I embed the page onto another page with other panels it styles all those panels as well. So I need to call out the specific macro. I am not sure how to include the #macro-ID into the styling above.

1 Answer 1

2

To style the header of a specific panel in confluence when you're embedding a page with multiple panels, you can target the specific macro by using a more specific selector that includes the macro's ID or class.

If the macro generates a unique ID or class for the panel, you can reference it directly in your CSS.

Suppose you have a macro with an ID like macro-12345 , you can apply your styles like this:

#macro-12345 .panelHeader {
 color: red;
 font-family: Arial, sans-serif;
}
Sign up to request clarification or add additional context in comments.

1 Comment

I have tried this approach and it is not applying any styling at all. When I inspect the page the panel macro does not have an ID that I can see, however when I am in edit mode and enter the source editor there is an ID assigned. This is the ID I used.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.