CSS for specific text by Confluence

I am wondering if there is a way to use native CSS for specific text on my merge page (without using inline HTML).

+7
source share
5 answers

Sorry, this is an old question, but for the sake of people who are looking for the answer to this question: you can use span or div macros and use custom CSS to apply whatever style you want to their content.

If necessary, you can create custom div and span classes to use multiple styles to select text.

EDIT: Here is an example of wikimarkup that you could use for this.

{div:class=customCss|style=float:left; margin-right:50px} Custom text in a div {div} 

That way you can use the div class and apply the style in custom css for the merge space, or you can use the inline style for the div.

+7
source

You can do it...

 {composition-setup}import.css=/download/attachments/123456789/custom.css {composition-setup} 

This is if you saved the custom.css file as an attachment. You will obviously need to replace 123456789 with the actual binding number.

You can also link CSS on an external site (with an absolute URL), but if you have automatic URL formatting, this tends to mess it up every time you change a document.

+3
source

I am using a custom macro that displays $ body in HTML. I can then put any HTML tags that I want on the wiki page into the user macro tag.

+1
source

There may be a way to achieve what you want to achieve, but there is some information missing (from you). What allows the merger:

  • If you have administrator rights to the merge wiki, you can add a special style sheet there that applies to all wiki pages. Alternatively, you can execute Mus .
  • Then you should parse the wiki page in its original form. So load the wiki page that you want to style, and look at the source of this wiki page in your browser. Depending on your browser, this may be CTRL-U or something similar. Here in chrome, the page menu says View page source .
  • Try to find the defining selector for your wiki text that you want to style in one form or another. A smart hack could be:
    • Find a wiki style that is not used by others. I experimented with ~subscript~ .
    • Find the HTML tags that are created using this style. In my example, it was <sub>subscript</sub> .
    • Use a stylish style sheet to style this style.
    • However, this can change the text in which the style is used for its original meaning: - (
0
source

You can specify custom CSS in the Confluence page using div and span macros.

In recent versions of Confluence (4.0 and later), you can do this as follows:

  • Enter {div} or {span} . When you enter a closing bracket } autocomplete converts the text to a macro.
  • Left-click on a macro frame and select the "Edit" button
    enter image description here
  • Enter custom CSS in the Style field and close the dialog box.
  • Enter text in the macro frame. Then the style you specified will be indicated.
0
source

All Articles