- This topic has 5 replies, 3 voices, and was last updated 3 years, 10 months ago by Tom.
June 25, 2017 at 12:30 pm #338732Evadex
I would like to know the CSS code to add a picture in background without to use the wp editor.
With the very good help of GP, I know now it’s possible to use background-image url(‘http://…..’) but if I put my picture “sun.jpg” in a folder “pictures” inside the first folder theme “generatepress”, what’s the CSS ?
I’ve ever test : background-image url(../pictures/sun.jpg) or url(./pictures/sun.jpg) or url(‘../picture/sun.jpg’) or url(“../picture/sun.jpg”) but no effect.
Of course, thank you very much for your helpGP Premium 1.3.1June 25, 2017 at 12:34 pm #338735LeoStaffCustomer Support
Just want to double check, so you don’t want to use the Background Images add-on in the customizer?
Any reason for that?
Let me know 🙂June 25, 2017 at 2:36 pm #338813Evadex
Thank you for your answer of yesterday (add Simple CSS and the code: background-image: url(‘http://id picture’). With this, I’m happy to use different pictures on different templates.
It’s not possible (or I don’t know how to do) with Background images add-on beacause it’s the same picture for every templates.
I’ve sean a solution to directly import a picture from a folder (inside the generatepress theme folder), with the code : background: url(../Folder/picture.jpg) not background-image: url(‘http://id of picture’)
it would be faster to charge.?.
Unfortunatly, I’ve ever test some solutions (first post) without effect.
Thanks for your help !June 25, 2017 at 3:08 pm #338849TomLead DeveloperLead Developer
You would need to use the full URL to the image instead of the relative URL.
You could use a relative URL if you were adding your CSS into your child theme style.css file, and your images were also in your child theme folder.June 25, 2017 at 6:10 pm #338897Evadex
Thank you for your answer, I’m beginner, it’s an honor to speak with you.
I tested with a parent theme but I can’t ask a picture in the same folder. May be “../” or “./” are not good or I don’t use the good code, certainly you know the good code better than me (background-image or without “-image” per exemple ?).
In addition to this, I don’t know if the child stlyle.css file will charge after the css parent file and I’ll can’t change the font-size or family directly with the theme generatepress .
Per exemple, my primary navigation return to the default parameters.
Finaly, I think to return at the parent theme and use absolute URLs, as your judicious advise.
I let you close this post. Thank you very much for your attention, and sorry for my low English level, in informatic development too 🙂June 25, 2017 at 7:06 pm #338912TomLead DeveloperLead Developer
- You must be logged in to reply to this topic.