Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS for specific text on Confluence

Tags:

css

confluence

I am wondering if there is a way to use custom css for some specific text on my confluence page (not using embedded HTML).

like image 997
Andrew Avatar asked Jun 14 '11 15:06

Andrew


Video Answer


3 Answers

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

If necessary, you could create custom div and span classes to allow for multiple styles to be applied to selections of text.

EDIT: Here is an example of the wikimarkup you could use to do this

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

So you can either use the div class and apply a style in the custom css for the confluence space, or you can use an inline style for the div.

like image 170
MNRSullivan Avatar answered Oct 19 '22 16:10

MNRSullivan


You can do this ...

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

That's if you've stored a custom.css file as an attachement. You'd obviously need to replace 123456789 with the actual attachment number.

You can also link CSS on an external site (with an absolute URL), but if you have any automatic URL formatting, that tends to mess it up everytime you change the document.

like image 34
musaul Avatar answered Oct 19 '22 17:10

musaul


I use a User Macro that renders the $body in HTML. Then I can put whatever HTML tags I want in the wiki page within the user macro tag.

like image 1
bruce Avatar answered Oct 19 '22 17:10

bruce