THshadow Posted February 9, 2018 Share 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? Link to comment Share on other sites More sharing options...
Meddysong Posted February 10, 2018 Share 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. Link to comment Share on other sites More sharing options...
Brian A. Posted February 10, 2018 Share 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'. Link to comment Share on other sites More sharing options...
THshadow Posted February 11, 2018 Author Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.