开发者

CSS for https urls

looking for some help with images referenced within the开发者_运维问答 stylesheet. I have no problems with these from non secure locations within the site but only from https. The stylesheet loads fine and displays everything correctly except for the images.

example:

body {
margin: 0;
padding: 0;
background: url(/img/background_tile.gif) top left repeat-x;
text-align: center;
background-color: #fff;
}

All my css files and other image paths inside the code use relative urls to images. How can I make sure they all work fine without hard coding my image paths with https or http? I want the code to work fine with http and https.

Thanks


I would open FireBug, look at the Net Tab, and see the HTTP status code for the image.

If the codes are 404, then I would look into the httpd.conf file (assuming you are using Apache) to see what the DocumentRoot is for your port 443 directives.

I say this knowing that is only kind of makes sense because if the 443 directive had a completely incorrect DocumentRoot then the entire site would not display.

CSS for https urls

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜