Linking Custom CSS to images in the file manager

  • 1
  • Question
  • Updated 7 years ago
  • Answered
What url would I use to link the custom CSS to a file I've uploaded in the file manager? More specifically, the original CSS is as follows:

div.post_banner_element {
background:url(http://s3.yolacdn.net/V0022974/templa...) no-repeat top center transparent;
width:943px;
height:36px;
margin:0;
padding:0;
}

and instead of the image "post-banner-element.jpg" i'd like to point it to the image I have in the file manager, but since I cannot see the folder structure of the site and where the folders are in relationship to one another, I have no idea where to point it.
Photo of eph3x.andrew

eph3x.andrew

  • 2 Posts
  • 0 Reply Likes

Posted 7 years ago

  • 1
Photo of Gop

Gop

  • 7473 Posts
  • 2115 Reply Likes
OK Andrew,

I think this is an easy solution for you.

The File Manager in all yola built sites is called resources so your example image would be addressed by:

http://yoursite.com/resources/{optional folder}/post-banner-element.jpg

The optional folder is something that you may create within the file manager to organise groups of images for example.

The adress usually can be called either directly as above or indirectly: /resources/{optional folder}/post-banner-element.jpg
Photo of Nathan

Nathan, Champion

  • 3739 Posts
  • 307 Reply Likes
Actually you don't want that first "/" on the indirectly version because it won't work in the preview or in the site builder. So it would be:

resources/{optional folder}/post-banner-element.jpg
If you add the first "/" it makes it:

sitebuilder.yola.com/resources/{optional folder}/post-banner-element.jpg

(even though you aren't actually adding the domain part in)

Which obviously doesn't exist. But if you don't have the first "/" in it, it will work because the preview (and site builder) is built on many folders.

Just wanted to let you know that :)
Photo of Gop

Gop

  • 7473 Posts
  • 2115 Reply Likes
Thanks Nathan. I'm grateful for your eye on this.
Photo of eph3x.andrew

eph3x.andrew

  • 2 Posts
  • 0 Reply Likes
Thank you all, this helped a lot. Now I can focus finalizing some header illustrations!
Photo of Gop

Gop

  • 7473 Posts
  • 2115 Reply Likes
Good to hear Andrew.