Jump to content

IP.Pages Media / CSS

Featured Replies

Posted

I have created a custom page, added the CSS and JS files in the templates section.

I uploaded a few images into the media section as well for this page. 

My CSS file is looking for these images, how do I reference images in the media folder for this particular page?

 

Screen Shot 2018-02-09 at 3.44.43 PM.png

Screen Shot 2018-02-09 at 3.45.26 PM.png

I got caught out by this in the past and asked the same question. The unfortunate answer is that you can't use the media tag in CSS.

17 hours ago, THshadow said:

My CSS file is looking for these images, how do I reference images in the media folder for this particular page?

You can't reference media tag(s) in the CSS because the Templates page is raw for CSS & JS. Instead, there's a solution to this, right click on the selected file and it should say 'Copy image address'.

  • Author

Thanks all - I used this process. 

I just didn't want to use the full URL and hardcode stuff incase I move things around later. 

This seems to work fine though. 

background: url(../pages_media/loading.gif) no-repeat

 

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.