Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
THshadow Posted February 9, 2018 Posted February 9, 2018 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?
Meddysong Posted February 10, 2018 Posted February 10, 2018 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.
Brian A. Posted February 10, 2018 Posted February 10, 2018 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'.
THshadow Posted February 11, 2018 Author Posted February 11, 2018 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.