XF 2.2 Is there a way to set my background image the same way you set the Favicon?

bennylava

Member
Hi all, I'm looking to set my background image. I thought it would be there under Style Properties. The Ai chatbot says what I posted below. But to me, that looks like the image will have to be hosted somewhere like on ImageShack. I would rather it be installed on the same server I have Xenforo installed on. So that if I have to migrate for whatever reason, everything just goes together. Without having to hunt down this and that. Here's what Perplexity said:

"To set a background image that spans the entire width behind the main body of the forums in Xenforo, you need to modify the CSS file. Here are the steps:
  1. Go to the AdminCP > Appearance > Style Properties.
  2. Find the "Custom CSS" box and add the following code:

css
<span>body</span> <span>{</span><br> <span>background-image</span><span>:</span> <span data-darkreader-inline-color=""><span data-darkreader-inline-color="">url</span><span>(</span>'PATH/TO/YOUR/IMAGE.jpg'<span>)</span></span><span>;</span><br> <span>background-repeat</span><span>:</span> no-repeat<span>;</span><br> <span>background-size</span><span>:</span> cover<span>;</span><br> <span>background-position</span><span>:</span> center center<span>;</span><br> <span>background-attachment</span><span>:</span> fixed<span>;</span><br><span>}</span><br>
Replace 'PATH/TO/YOUR/IMAGE.jpg' with the actual path to your image file. This code sets the background image, prevents it from repeating, covers the entire background area, centers the image, and fixes it so it doesn't scroll with the page.
  1. Click "Save Changes" at the bottom.
The background image should now be visible behind the main forum content area across the entire width of the page.If you want the image to repeat horizontally instead of covering the entire background, remove background-size: cover; and background-position: center center; from the CSS."

Is that the only way to do it? Is there no way to simply load the image from my own hard drive, like I did with the Favicon?
 
Thank you for the replies!

Does uploading the images from your own hard drive like this, affect a "Theme"? The way you install a theme seems like it might not use this method of adding a background image. Just wanted to check.
 
Top Bottom