So, using IE as my browser, I have a simple link…
<a href="test.jpg">Image Link</a>
Is it possible to change the background color of the page this image loads up in?
I want to avoid creating a whole new page for the image.
EDIT Sorry for the confusion. I thought it was pretty clear. Pascal has it right as does Guffa.
from Pascal… “I understood that he want the image opened in a new page, and that page to have a specific background-color”
@David Andes, you are correct in that the link implies what is happening (“I know the image is part of the anchor itself”), which is that the image will be opened in a new page. However, the language you quoted is not correct.
“change the background of the image this page loads up in.”
Ultimately, I would like to change the background color of the page that this image is opened in.
So the answer to the comment on this post is indeed (1) want the background color to change for the page loaded by a click to “Image Link,”
When someone clicks on such a link, the only thing the browser loads up is the image itself — not any “page”.
This means the background-color depends on the browser, and there is nothing you can do about it.
If you want your image to be displayed in any other “page”, you’ll have to code that one — still, if you have several images, you don’t need to code a different page for each one : a generic page, able to display any image, and received a parameter indicating which image should be displayed, will do the trick.
Just for fun : under firefox, that background-color can be changed by going to
about:config, searching for thebrowser.display.background_colorproperty, and changing it.Of course, as a webmaster, you have no control over it : only a user can change it, for his instance of firefox.