Hi Team,
I'd like to set an image as the background for a page but I cannot understand how the macro 'Background Image' works. Tried with CSS styling but no luck
Note:
I am on Confluence data centre 8
The image I have is within the org's website, but it is downloadable.
I tried the below with CSS Stylesheet macro is did not work. I am not experienced in this so this was a sample attempt at adding a background.
#header .aui-header { background-image:url('https://markiIT.SAMPLE.com/resource/resource/info/ac63558fea6246888c8b45cbaf07e157'); background-repeat: no-repeat; }
Hi MudCo,
Try this:
To add a background image to a Confluence page, you can use a user macro. Here’s how you can create and use a user macro to achieve this:
Create the User Macro:
## @param image:title=Background Image URL|type=string|required=true|desc=A link to the image to display in the background.
<div style="background-image: url($paramimage); background-repeat: no-repeat; background-size: cover; height: 100vh; width: 100%; position: absolute; top: 0; left: 0; z-index: -1;">
$body
</div>
Use the User Macro:
Alternatively, you can use the Panel Macro to add a background image to a specific section of your page. Here’s how:
titleBGColor
and bgColor
to a transparent color or a color that complements your background image.{panel:title=My title|borderStyle=dashed|borderColor=blue|titleBGColor=transparent|titleColor=white|bgColor=transparent}
<div style="background-image: url('your-image-url'); background-repeat: no-repeat; background-size: cover; height: 100vh; width: 100%;">
Your content here
</div>
{panel}
Remember, you may need admin access to create user macros. If you do not have admin access, you might need to contact your Confluence administrator for assistance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.