Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted February 9, 20187 yr 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?
February 10, 20187 yr 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.
February 10, 20187 yr 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'.
February 11, 20187 yr 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.