2

If I have a CSS file that loads with HTTPS (e.g. https://www.mydomain.com/includes/style.css) that contains

body { background:url("../images/background.png"); }

The background pic loads like: (without HTTPS). Do you know a quick fix around this without putting the full path to the CSS file (needs to be relative)? I'm looking for the easiest fix!

Thanks in advance!

Gabriel

1 Answer 1

2

I think that you should give a try to protocol URLs (network-path reference) to solve your problems when you use HTTP mixed with HTTPS. So your CSS will be in this case something like this :

body { background:url("//www.mydomain.com/images/background.png"); }
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.