View Full Version : style for a link opened page

01-15-2003, 04:42 PM
I have a link that points to a image.

<a href="images/mypic.gif">Pic1</a>

is there any way to set the bg color of the page that the image opens in.

Roy Sinclair
01-15-2003, 05:41 PM
Yes, point the link to a html page which will display the image and have the desired background color.

01-15-2003, 06:08 PM
in other words, no, not by just linking to the picture.

as Roy says, you could make another page just for the picture, and set the background color for that page.

01-15-2003, 06:41 PM
Thanks, I will make a page just for images and pass the path of the image so that it can be used for all my pics.

01-15-2003, 08:10 PM
in fact, with javascript you can change the background from the opener window, but it is better to create a page to show all the images

01-15-2003, 10:48 PM
how would you do that?

01-16-2003, 12:55 AM
an example:

<a href="images/mypic.gif" onclick="zxs=window.open(this.href);zxs.document.bgColor='#FFCC00';return false">Pic1</a>

and you can make a function to execute the code, of course

01-16-2003, 02:25 PM
cool. i didn't know you could do that.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum