Kreykoui Posted October 8, 2022 Share Posted October 8, 2022 Hi there, I've been trying for a while to introduce a background image into the header of my next store using information found on the web, but it still doesn't work. Here is my starting point: #header{ position:relative; z-index:999; color:#7a7a7a; background:#fff; box-shadow:0 2px 5px 0 rgba(0,0,0,0.11) } Since color replacement works great, I guess I'm in the right place. But I still haven't found the right way to introduce an image with: background-image: url('my-image.png'); So there is something that escapes me. Here are the questions I ask myself and on which I appeal to your knowledge: Where should I place my images in the tree structure of my site? What is the exact syntax to use in the CSS? Are there other manipulations or precautions in order to have the right result? Thank you for your valuable time. Link to comment Share on other sites More sharing options...
ps8modules Posted October 9, 2022 Share Posted October 9, 2022 Hi. Add your image to: themes\your_theme\assets\img\my-image.png And css: background-image: url("../img/my-image.png") Link to comment Share on other sites More sharing options...
Kreykoui Posted October 9, 2022 Author Share Posted October 9, 2022 Hi 4you.software, Thanks for your help. I still have no result. I even cleared the cache of Prestashop as well as the cache of my browser. I also removed the background color. There is really something that intrigues me. In addition, I use the original theme to avoid conflicts. Link to comment Share on other sites More sharing options...
ps8modules Posted October 9, 2022 Share Posted October 9, 2022 (edited) Send me the store URL in a private message. I'll look at the inspector. Edited October 9, 2022 by 4you.software (see edit history) Link to comment Share on other sites More sharing options...
Kreykoui Posted October 9, 2022 Author Share Posted October 9, 2022 It's on local server. Sorry. Link to comment Share on other sites More sharing options...
ps8modules Posted October 9, 2022 Share Posted October 9, 2022 (edited) You should have written that in the beginning. On a local computer, e.g. in WAMP, the path is different than on a sharp e-shop. 1. ps_root/img/my-image.png background-image: url('../img/my-image.png'); Edited October 9, 2022 by 4you.software (see edit history) Link to comment Share on other sites More sharing options...
Kreykoui Posted October 9, 2022 Author Share Posted October 9, 2022 (edited) Sorry for forgetting. I use wamp64 and working with Classydevs Custom CSS and JS. Put the image in : wamp64\www\mysitename\themes\classic\assets\img wamp64\www\mysitename\prestashop\img wamp64\www\mysitename\admin***\themes\default\img wamp64\www\mysitename\img Still no results. I keep searching... Edited October 9, 2022 by Kreykoui (see edit history) Link to comment Share on other sites More sharing options...
ps8modules Posted October 9, 2022 Share Posted October 9, 2022 http://forum.wampserver.com/read.php?2,118763,118771 Link to comment Share on other sites More sharing options...
ps8modules Posted October 9, 2022 Share Posted October 9, 2022 The conversion from localhost to a sharp e-shop entails problems. When I make an e-shop for a customer, I do it on a subdomain to a sharp domain on web hosting. Link to comment Share on other sites More sharing options...
Kreykoui Posted October 9, 2022 Author Share Posted October 9, 2022 Thanks for the informations. I checked with the inspector and the note is: Invalid property value Link to comment Share on other sites More sharing options...
ps8modules Posted October 9, 2022 Share Posted October 9, 2022 And why don't you at least put a screen here? Link to comment Share on other sites More sharing options...
Kreykoui Posted October 9, 2022 Author Share Posted October 9, 2022 You are right, here it is! Link to comment Share on other sites More sharing options...
ps8modules Posted October 9, 2022 Share Posted October 9, 2022 (edited) Thanks. And have you tried adding two dots before the slash directly in the inspector? Test the url change directly in the inspector. Edited October 9, 2022 by 4you.software (see edit history) Link to comment Share on other sites More sharing options...
Kreykoui Posted October 9, 2022 Author Share Posted October 9, 2022 Yes and I also tried single apostrophe or double apostrophe. Link to comment Share on other sites More sharing options...
ps8modules Posted October 9, 2022 Share Posted October 9, 2022 (edited) ../../../../img/ etc. I don't have Wamp to give you an exact answer. You just have to test. You'll be redoing it anyway at a sharp e-shop. Edited October 9, 2022 by 4you.software (see edit history) Link to comment Share on other sites More sharing options...
Kreykoui Posted October 9, 2022 Author Share Posted October 9, 2022 Thanks a lot for your help. I'll let you know as soon as I find it. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now