Welcome to WebmasterWorld Guest from

Forum Moderators: brotherhood of lan & mack

Message Too Old, No Replies

CSS not showing up on secure pages

6:26 pm on Jul 19, 2007 (gmt 0)

5+ Year Member

We're in the midst of development of our site. When browsing, everything looks fine. However, when we access our order page, which is a secure page (ie. https), the page does not have any of the styling applied from the CSS files. In fact, if I use "https", instead of "http", in the path for any of our pages, the same thing occurs.

How can I fix this?


6:29 pm on Jul 19, 2007 (gmt 0)

10+ Year Member

Sounds like you are using the full URL for the stylesheet. If you change the call for the stylesheet from 'http://www.yourdomain.com/afolder/stylesheet.css' to '/afolder/stylesheet.css' it should clear that up.
6:46 pm on Jul 19, 2007 (gmt 0)

5+ Year Member

Actually, we're using relative links, not absolute links. It was working fine not too long ago and now suddenly we're having this problem of the CSS not being applied to secure pages.

Any other ideas?

All our files are in our "httpdocs" folder. Do we need to put anything in the "httpsdocs" folder?


8:46 pm on Jul 19, 2007 (gmt 0)

5+ Year Member

Okay. I discovered what the problem was. Apparently, I had added some code into our .htaccess file to prevent hotlinking of images and our css. And the code does not specify "https". So, that was the problem.

- Ron