Good Morning everyone...

Hopefully someone has a simple fix for this.

I don't do much with styling using CSS yet... (but I'm getting there)

I have a website that I have up on a development domain as well as on a live domain

The live domain has an ssl certificate on it, so I'm guessing that it may be the cause of this.

Using CSS, I'm displaying a facebook link in the top left corner of the monitor as a fixed image, so it remains there no matter what.
Problem is that while it works perfectly on the http (dev) site, it shows as a broken image on the https (live) site
and yes, the image is uploaded to both domains.

Here is the line of code from the view source on the the page

<a href="" target="_blank" style="position:fixed; top:200px;left:10px;"><img style="width:125px; height:67px;" src="/images/facebook_link.png"></a>

at first I thought that relative addressing was the issue, but even when I tested it with a fully qualified https address it still remained broken.

Any suggestions from anyone as to what the problem might be?

Remember, it works perfectly on the http, but not on the https - I'm thinking that has to be the key.

Thanks in advance

https is just the communications protocol between the browser and the server. It doesn't affect the content being sent or received, so that isn't the problem.

Since you say the image exists in both environments, I'd suggest that you make sure that the URL paths are the same as well. That is, you're using relative addressing in the 'src' attribute of your <img> tag. The leading '/' means the path starts at the domain root directory which is apparently valid in your development environment. But is it valid in the live domain on the page where this tag resides? If you're testing this code in a subdirectory on the live domain, this is almost certainly where the problem lies.

Sometimes I really wonder about myself...

I said it was uploaded to both domains because I uploaded it twice...

I just went to be sure, and found that I had apparently uploaded it to the images file on the dev domain twice and never to the live domain.

I do have completely seperate domains that have identical file structures... one for development and the other for the live site that the scripts are uploaded to as they are completed.

Amazing how well something works when you have the image where it belongs

Sorry for the bother... that is the second time I've done that in as many weeks.


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.